How to steam/open a pdf in a new window.

Hi,
I am using the following code to stream a newly created pdf to internet explorer.

HttpResponse _response=HttpContext.Current.Response;
doc.Save("Quote-TAGP-" + Session["SelectedQuote"].ToString()+ ".pdf",_response, HttpReadType.Open);

I would like the pdf to open in a new window, and have read that this is not possible. Is there a way I can acheive the same required result, i.e. the pdf is displayed in a new inernet explorer window.

Thanks, Alasdair.


3 Replies

SS Sri Subhashini M Syncfusion Team May 29, 2008 01:21 PM UTC

Hi Alasdair,

It is possible to open pdf in new browser. To keep the pdf object live on new window you need to create a session variable with pdf document object. To popup a new browser window , use window.open() method.

Please look into the sample from the below specified link and let me know if this helps.

http://websamples.syncfusion.com/samples/PDF.Web/6.3.0.6/74065/main.htm



Regards,
Suba





AD Administrator Syncfusion Team June 3, 2008 10:07 PM UTC

Hi Suba, Thanks for your fast response. The code example you sugested works great. Regards, Alasdair.

>Hi Alasdair,

It is possible to open pdf in new browser. To keep the pdf object live on new window you need to create a session variable with pdf document object. To popup a new browser window , use window.open() method.

Please look into the sample from the below specified link and let me know if this helps.

http://websamples.syncfusion.com/samples/PDF.Web/6.3.0.6/74065/main.htm



Regards,
Suba







SS Sri Subhashini M Syncfusion Team June 9, 2008 04:23 AM UTC

Hi,

Glad to know that it helps you.

Please let me know if you have any other queries.

Best,
Suba


Loader.
Up arrow icon