Open PDF

Discussion in 'ASP General' started by CJM, Jul 20, 2006.

  1. CJM

    CJM Guest

    I have an application that generates PDF documents (from an ASP page). In
    some cases, I need to generate a PDF then provide a link to that PDF from
    the web page - this I can do fine. In other cases, I want to generate the
    PDF, but then immediately open the PDF in the browser; in this case, once I
    have generated the PDF, I am simply using 'Response.Write MyPDFPath' to open
    the document.

    However, for some people this doesn't work, but for some it does. And I
    can't figure out why results are different. In both cases, the browser
    address changes to match the URL for the PDF document, but in some cases,
    all you can see is a blank screen. If you click on the Refresh/Reload
    button, the PDF displays perfectly - so it's not a show-stopper, but it is a
    bit of an inconvenience.

    Has anyone got any ideas why this may be happening? Is there a better way
    of opening the PDF? I thought of streaming directly to the client, but that
    would present the user with an Open/Save/Cancel dialog, which although is
    more intuitive, it's hardly any easier than clicking on Refresh.

    Thanks in advance.

    Chris
     
    CJM, Jul 20, 2006
    #1
    1. Advertising

  2. Hello Chris,

    Thank you for the posting. Regarding the issue, before you redirect the
    user to the PDF url with 'Response.Write MyPDFPath', is the PDF actually
    written to the disk? For example, it is somehow in the disk I/O cache, or
    sometime it has been successfuly written to the disk. This may be why the
    problem ocur occasionally. Before the redirection, if you deply 1 or 2
    seconds with code, will this hlep on the issue?

    Sincerely,

    Luke Zhang

    Microsoft Online Community Support
    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Luke Zhang [MSFT], Jul 21, 2006
    #2
    1. Advertising

  3. Gazing into my crystal ball I observed "CJM"
    <> writing in
    news::

    > I have an application that generates PDF documents (from an ASP page).
    > In some cases, I need to generate a PDF then provide a link to that
    > PDF from the web page - this I can do fine. In other cases, I want to
    > generate the PDF, but then immediately open the PDF in the browser; in
    > this case, once I have generated the PDF, I am simply using
    > 'Response.Write MyPDFPath' to open the document.
    >


    Is this something that is part of an Intranet and you KNOW that people
    have the software available and you KNOW how their browsers are
    configured? Personally, I hate it when a page tries to open a PDF in the
    browser. I have my browsers configured to ALWAYS save the file.

    As an aside, I found a great reader that takes a fraction of the time to
    load as Adobe <http://www.foxitsoftware.com/pdf/rd_intro.php>

    --
    Adrienne Boswell at Home
    Arbpen Web Site Design Services
    http://www.cavalcade-of-coding.info
    Please respond to the group so others can share
     
    Adrienne Boswell, Jul 24, 2006
    #3
  4. CJM

    CJM Guest

    "Adrienne Boswell" <> wrote in message
    news:Xns980A14D9C547arbpenyahoocom@69.28.186.121...
    >>

    >
    > Is this something that is part of an Intranet and you KNOW that people
    > have the software available and you KNOW how their browsers are
    > configured? Personally, I hate it when a page tries to open a PDF in the
    > browser. I have my browsers configured to ALWAYS save the file.
    >


    Yes, it is an intranet application, and Adobe Acrobat is the standard PDF
    software installed on all machines.

    > As an aside, I found a great reader that takes a fraction of the time to
    > load as Adobe <http://www.foxitsoftware.com/pdf/rd_intro.php>
    >


    I'm afraid that my hands are tied when it comes to the software - we have a
    standard software set and I can't change it.

    Thnaks

    Chris
     
    CJM, Jul 24, 2006
    #4
  5. CJM

    CJM Guest

    "Luke Zhang [MSFT]" <> wrote in message
    news:...
    > Hello Chris,
    >
    > Thank you for the posting. Regarding the issue, before you redirect the
    > user to the PDF url with 'Response.Write MyPDFPath', is the PDF actually
    > written to the disk? For example, it is somehow in the disk I/O cache, or
    > sometime it has been successfuly written to the disk. This may be why the
    > problem ocur occasionally. Before the redirection, if you deply 1 or 2
    > seconds with code, will this hlep on the issue?
    >


    I'm investigating this, Luke. I'll let you know what I find out.

    Thanks
     
    CJM, Jul 24, 2006
    #5
  6. Hello,

    How is it going on now? Is the information I provided in the previous
    message helpful? If you need further assistance on the issue, please feel
    free to let us know.

    Sincerely,

    Luke Zhang

    Microsoft Online Community Support
    ==================================================
    Get notification to my posts through email? Please refer to
    http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
    ications.

    Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 1 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions or complex
    project analysis and dump analysis issues. Issues of this nature are best
    handled working with a dedicated Microsoft Support Engineer by contacting
    Microsoft Customer Support Services (CSS) at
    http://msdn.microsoft.com/subscriptions/support/default.aspx.
    ==================================================

    This posting is provided "AS IS" with no warranties, and confers no rights.
     
    Luke Zhang [MSFT], Jul 27, 2006
    #6
    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:
    472
    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:
    464
    Carl Prothman [MVP]
    Aug 18, 2003
  3. Replies:
    1
    Views:
    472
    =?Utf-8?B?bGF0aGEgdmFsbGluYXlhZ2Ft?=
    May 5, 2005
  4. Ricardo Pog
    Replies:
    1
    Views:
    442
    Austin Ziegler
    Mar 26, 2008
  5. Sean Nakasone
    Replies:
    1
    Views:
    391
    Farrel Lifson
    Apr 14, 2008
Loading...

Share This Page