Open PDF

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • CJM

    Open PDF

    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


  • Luke Zhang [MSFT]

    #2
    RE: Open PDF

    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
    Gain technical skills through documentation and training, earn certifications and connect with the community

    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/subscripti...t/default.aspx.
    =============== =============== =============== =====

    This posting is provided "AS IS" with no warranties, and confers no rights.



    Comment

    • Adrienne Boswell

      #3
      Re: Open PDF

      Gazing into my crystal ball I observed "CJM"
      <cjmnews04@news group.nospamwri ting in
      news:eVo1qAArGH A.4632@TK2MSFTN GP05.phx.gbl:
      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.foxitsoftwa re.com/pdf/rd_intro.php>

      --
      Adrienne Boswell at Home
      Arbpen Web Site Design Services
      Arbpen Consulting will help you harness valuable insights and translate them into tangible results by merging data and strategy.

      Please respond to the group so others can share

      Comment

      • CJM

        #4
        Re: Open PDF


        "Luke Zhang [MSFT]" <lukezhan@onlin e.microsoft.com wrote in message
        news:KzbRsoGrGH A.1572@TK2MSFTN GXA01.phx.gbl.. .
        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


        Comment

        • CJM

          #5
          Re: Open PDF


          "Adrienne Boswell" <arbpen@yahoo.c omwrote in message
          news:Xns980A14D 9C547arbpenyaho ocom@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.foxitsoftwa re.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


          Comment

          • Luke Zhang [MSFT]

            #6
            Re: Open PDF

            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
            Gain technical skills through documentation and training, earn certifications and connect with the community

            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/subscripti...t/default.aspx.
            =============== =============== =============== =====

            This posting is provided "AS IS" with no warranties, and confers no rights.



            Comment

            Working...