473,395 Members | 1,639 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

stream pdf to browser

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


May 8 '07 #1
3 2296
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.


May 9 '07 #2
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
-----------------------------------------
May 9 '07 #3
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

"MasterGaurav (www.edujini-labs.com)" <ga*****************@nospam.gmail.com>
wrote in message news:e9**************@TK2MSFTNGP06.phx.gbl...
>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
-----------------------------------------


May 9 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: microsoft | last post by:
Hi, I have an ASP script that initiates a ADODB.Stream like below first bit gets filename from the database strAbsFile = getfilefromDB(request.querystring("fileid")) '-- create FSO object...
5
by: Dave | last post by:
Hi, I have this code that will write the transformed XML immediately to the browser with the Response object.. XslTransform trans = new XslTransform() trans.Load(MapPath("MyXsl.xsl"))...
6
by: Tom Kaminski [MVP] | last post by:
I can do this in ASP, but not sure how to handle in ASP.NET: How To Use the ADODB.Stream Object to Send Binary Files to the Browser through ASP http://support.microsoft.com/?kbid=276488 Do I...
3
by: Erwin Moller | last post by:
Hi, I have a little problem figuring out something that solves the folowwing problem: 1) 1 script that can run for many hours (days). It will output regulary some information. 2) A browser...
1
by: Pedro Leite | last post by:
hello. got stalled at at point that i can no longer get my thoughts together. the point, is in classic asp, stream an excel file from a firebird database. temporarly save it if necessary...
4
by: Pedro Leite | last post by:
Good Afternoon. the code below is properly retreiving binary data from a database and saving it. but instead of saving at client machine is saving at the server machine. what is wrong with my...
2
by: Cuong.Tong | last post by:
Greeting, Can anyone give me some hints about parsing the mulitpart/form-data stream? I have a form looks something like this <form action="process.dll> <input type=file...
6
by: MC | last post by:
Suppose I wish to do a programmatic POST. Is it possible to display the response in a browser? I also want to keep the same session as was made with the POST. All I can think of is to first save...
4
by: CptDondo | last post by:
I have an airlink101 ipcam. It "streams" jpeg images to a web browser. Basically, the camera sends a never-ending http page, and continually retransmits a jpeg image. This sort of works, but...
1
by: coolsti | last post by:
I am having a curious problem with Vista working on a Lenovo thinkpad. To test and demonstrate this problem, I have a PHP script that does not terminate. It enters an infinite loop where it...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.