stream pdf to browser

R

Rick

I have a web service that retrieve a pdf file and streams the file into a
buffer passing the buffer on to the calling web page. This works perfect if
I use a button to submit a call to the web service and stream the file into
the calling web form, the problem I have is I need to open the streamed data
in a separate browser window keeping the initial calling web form open
..
I tried using Javascript to open an new window and on page load call the web
service, but doing this returns the buffer but does not post it to the
browser.

Any ideas on how to do this?

Thanks in advance,
Rick
 
M

MasterGaurav \(www.edujini-labs.com\)

I tried using Javascript to open an new window and on page load call the
web
service, but doing this returns the buffer but does not post it to the
browser.

What do you mean by that?
Are you trying to *fetch* the content via JavaScript (Ajax-calls)? It would
fail to serve your purpose since you will need to *flush* the content to a
*viewer*, that is scriptable.


--
Happy Hacking,
Gaurav Vaish | www.mastergaurav.com
www.edujini-labs.com
http://eduzine.edujini-labs.com
-----------------------------------------
 
S

Steven Cheng[MSFT]

Hi Rick,

Regarding on this issue, I have also found your another cross one below:

Subject: Stream pdf to browser
Newsgroups: microsoft.public.dotnet.framework.aspnet.security

Please feel free to followup in that thread.

Sincerely,

Steven Cheng

Microsoft MSDN Online Support Lead


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

Rick

I used the Javascript to open a seperate web form(This works):

Button2.Attributes.Add("onclick", "window.open('webform2.aspx?f=" &
txtFile.Text & "','mywindow')")

In the code behind of the web form that is opened I call the web service to
stream the file to the browser in the Page load event.

See comment in microsoft.public.dotnet.framework.aspnet.security
 

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

Top