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