Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forcing File Download dialog to appear for PDF files.
Message
General information
Forum:
Internet
Category:
Active Server Page
Miscellaneous
Thread ID:
00932495
Message ID:
00932510
Views:
19
Ho, sorry. I should of mentioned that this has to be done in classic ASP 3.0.

>Hello Greg,
>
>instead of redirecting directly to the PDF, you might have an ASPX page that will read the PDF and stream it
>
>something like :
>
>
>... read the PDF content here
>
>Response.Clear()
>Response.ContentType = "application/pdf"
>Response.AddHeader("Content-Disposition", "attachment;filename=mygeneratedpdf.pdf")
>Response.BinaryWrite(bytarrayMypdfcontent)
>
>
>if this doesn't work, you can try changing the ContentType :
>
>
>
>... read the PDF content here
>
>Response.Clear()
>Response.ContentType = "whateverunknowncontenttype"
>Response.AddHeader("Content-Disposition", "attachment;filename=mygeneratedpdf.pdf")
>Response.BinaryWrite(bytarrayMypdfcontent)
>
>
>Hope that helps
> Alex
Greg Reichert
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform