Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
PDF Problem
Message
General information
Forum:
ASP.NET
Category:
Other
Title:
Miscellaneous
Thread ID:
00941610
Message ID:
00941692
Views:
26
>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();


First off, your codde is totally correct...

I ran into the same thing... Thee only thing I found was that typically on the machines where the error occured there was an older version of the full Acrobat product installed. I searched for quite some time and never found a good explination. Hopefully though, that may help at least a small bit.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform