Open PDF

C

CJM

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
 
L

Luke Zhang [MSFT]

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.
 
A

Adrienne Boswell

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>
 
C

CJM

Adrienne Boswell said:
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
 
C

CJM

Luke Zhang said:
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
 
L

Luke Zhang [MSFT]

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.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top