Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PDF Problem
Message
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
PDF Problem
Miscellaneous
Thread ID:
00941610
Message ID:
00941610
Views:
67
I am creating a Crystal Report and generating a PDF. The PDF, when opened directly is fine however when using the following code to download the document I get:

"File is damaged and could not be repaired"

I put this in the page_load and call the web form. lcFilePath is a physical path to a location on the local disk.

Response.ContentType="Application/pdf";
Response.AppendHeader("Content-Disposition",lcFilePath);
Response.WriteFile(lcFilePath);
Response.Flush();
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Next
Reply
Map
View

Click here to load this message in the networking platform