RE: Stream pdf to browser



Hi Rick,

From your description, you're using webservice to expose some PDF stream
from backend file or database and stream them to web application(let web
application flush the pdf content to client). currently you're wondering
how to make the web application display the pdf stream download in a
separate browser window from the main window(which trigger the postback)
,correct?

Based on my experience, a typical approach to do this is a below:

1. You should create a separate page which dedicate to retrieving binary
content from the webservice(that return pdf buffer) and stream it out to
web page response). This page will use some url querystring as parameter to
identify which pdf file to retrieve from webservice.

2. In your main web page, when you click a button and postback to retrieve
pdf stream, you just simply register some client-side script that will open
a new browser window, the url is just the dedicated page created in #1 and
append some url querystring (indicate which pdf file to open).

How do you think?

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead



==================================================

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.





.