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:
00947071
Views:
27
This code seems to work regardless of the version of Acrobat.

>>Danny, Try this...
>
>FileName = Session["pdffile"].ToString(); // Set pdffile previously
>Attach = "filename="+FileName.ToString();
>Dest = @"c:\mylocation\"+FileName.ToString();
>
>FileInfo PDFFile = new FileInfo(Dest.ToString());
>
>Response.Clear();
>Response.AddHeader("Content-Disposition", "attachment; "+Attach.ToString());
>Response.ContentType = "application/octet-stream";
>Response.AddHeader("Content-Length", PDFFile.Length.ToString());
>Response.WriteFile(PDFFile.FullName);
>Response.End();
>
>With Acrobat Reader 6.0 I am able to Save and Open a PDF this way.

>
>Eric,
>
>I had meant to try this earlier and still haven't had the opportunity. I wanted to say thanks very much for passing it along though. Did this help you resolve the issue with the corrupted header message?
>
>Thanks again,
Eric Kleeman - EDS Consulting Services
MCP Visual FoxPro
MCSD C#.NET
Hua Hin Thailand
Los Angeles California
Previous
Reply
Map
View

Click here to load this message in the networking platform