Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Forcing File Download dialog to appear for PDF files.
Message
Information générale
Forum:
Internet
Catégorie:
Active Server Page
Divers
Thread ID:
00932495
Message ID:
00932510
Vues:
18
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform