forced PDF-download in popup

Discussion in 'ASP General' started by dany, Jun 30, 2003.

  1. dany

    dany Guest

    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.
    dany, Jun 30, 2003
    #1
    1. Advertising

  2. "dany" <> wrote in message
    news:eek:NTLa.5839$-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/windowsserver2003/community/centers/iis/
    Tom Kaminski [MVP], Jun 30, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Darren

    Forced Download of PDF

    Darren, Mar 2, 2005, in forum: ASP .Net
    Replies:
    3
    Views:
    374
    Darren
    Mar 3, 2005
  2. Replies:
    1
    Views:
    453
    =?Utf-8?B?bGF0aGEgdmFsbGluYXlhZ2Ft?=
    May 5, 2005
  3. xeroxero

    ASP.NET Forced Download Not Working

    xeroxero, Jan 25, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    513
  4. dany

    forced file download

    dany, Jul 1, 2003, in forum: ASP General
    Replies:
    1
    Views:
    115
  5. Gary D. Rezek

    "forced" download from ASP

    Gary D. Rezek, Aug 29, 2003, in forum: ASP General
    Replies:
    2
    Views:
    93
    Gary D. Rezek
    Aug 29, 2003
Loading...

Share This Page