By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,479 Members | 2,260 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,479 IT Pros & Developers. It's quick & easy.

forced PDF-download in popup

P: n/a
I want a forced PDF-download but all that header-stuff is new for me....

I wrote a little asp-script:
<%
Filename = "download.pdf"
response.addheader "content-disposition","attachment; filename=" & Filename
server.transfer Filename
%>

It only works with Internet Exporer (mac & pc) but not with Opera, Netscape
7,... ?!

I open it in a small popup but now I would have seen closed the popup
automatically
A simple "response.write" with "window.close()"-stuff don't work?!

ciao bye

d.
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
"dany" <da***************@yucom.be> wrote in message
news:oN*****************@afrodite.telenet-ops.be...
I want a forced PDF-download but all that header-stuff is new for me....

I wrote a little asp-script:
<%
Filename = "download.pdf"
response.addheader "content-disposition","attachment; filename=" & Filename server.transfer Filename
%>

It only works with Internet Exporer (mac & pc) but not with Opera, Netscape 7,... ?!

I open it in a small popup but now I would have seen closed the popup
automatically
A simple "response.write" with "window.close()"-stuff don't work?!


You're almost there ... use ADODB.Stream and Response.BinaryWrite.
http://support.microsoft.com/?kbid=276488

--
Tom Kaminski IIS MVP
http://www.iistoolshed.com/ - tools, scripts, and utilities for running IIS
http://mvp.support.microsoft.com/
http://www.microsoft.com/windowsserv...y/centers/iis/

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.