Open PDF via ASP

Discussion in 'ASP General' started by CJM, Jan 16, 2005.

  1. CJM

    CJM Guest

    I'm dynamically creating a PDF file using a 3rd-Party component. I've got
    this much working...

    However, once the PDF has been created, I want to open it in the browser.
    This is where I am struggling...

    I can create a page with a link to the PDF, but I dont know how to open the
    PDF in the browser directly.

    Any ideas?

    Chris
    CJM, Jan 16, 2005
    #1
    1. Advertising

  2. "CJM" <> wrote in message
    news:...
    > I'm dynamically creating a PDF file using a 3rd-Party component. I've got
    > this much working...
    >
    > However, once the PDF has been created, I want to open it in the browser.
    > This is where I am struggling...
    >
    > I can create a page with a link to the PDF, but I dont know how to open
    > the PDF in the browser directly.
    >
    > Any ideas?
    >
    > Chris



    Response.redirect http://yoursite.com/yourdoc.pdf

    If the user doesn't have Acrobat reader installed then it will just bring up
    a download box.

    --
    John Blessing

    http://www.LbeHelpdesk.com - Help Desk software priced to suit all
    businesses
    http://www.room-booking-software.com - Schedule rooms & equipment bookings
    for your meeting/class over the web.
    http://www.lbetoolbox.com - Remove Duplicates from MS Outlook
    John Blessing, Jan 16, 2005
    #2
    1. Advertising

  3. CJM

    McKirahan Guest

    "CJM" <> wrote in message
    news:...
    > I'm dynamically creating a PDF file using a 3rd-Party component. I've got
    > this much working...
    >
    > However, once the PDF has been created, I want to open it in the browser.
    > This is where I am struggling...
    >
    > I can create a page with a link to the PDF, but I dont know how to open

    the
    > PDF in the browser directly.
    >
    > Any ideas?
    >
    > Chris



    Have you tried a Response.Redirect to the PDF's URL?
    McKirahan, Jan 16, 2005
    #3
  4. CJM

    CJM Guest

    Thanks Guys...

    I'd already tried Response.Redirect (on my home machine) and it didnt work.
    However, displaying a normal link which points to the PDF worked OK, though
    it required that the user click on the link.

    However, I'm back on my normal development machine, and the very same code
    works fine...!

    I'm not sure what the problem was/is, but I'll close this thread and create
    a new one if the problem persists...

    Thanks

    Chris
    CJM, Jan 17, 2005
    #4
    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. Carl Prothman [MVP]

    Re: Open linked PDF-Files from a PDF-File

    Carl Prothman [MVP], Aug 9, 2003, in forum: ASP .Net
    Replies:
    4
    Views:
    463
    Paul Kuebler
    Aug 12, 2003
  2. Paul Kuebler

    Open linked PDF-Files from a PDF-File

    Paul Kuebler, Aug 12, 2003, in forum: ASP .Net
    Replies:
    8
    Views:
    454
    Carl Prothman [MVP]
    Aug 18, 2003
  3. Edwin Knoppert
    Replies:
    3
    Views:
    486
    Edwin Knoppert
    Dec 6, 2005
  4. Ricardo Pog
    Replies:
    1
    Views:
    416
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    355
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page