| Author |
opening a created PDF in internet browser
|
Rekha Pande
Ranch Hand
Joined: Jan 29, 2004
Posts: 145
|
|
Hi all... I'm creating a PDF file by passing parameters -> JSP -> Java program... now this file is saved on the server... What i want it that the button through which i'm generating the PDF ...Is there any one that through this same button i can open that created PDF file in the web browser so that the user can click save as and then store it on his / her PC. Any suggestions...?? :roll: :roll: Thanxs in advance
|
 |
arnel nicolas
Ranch Hand
Joined: Dec 16, 2003
Posts: 149
|
|
Try writing the file to the ServletOutputStream of your response. :roll: [ July 21, 2004: Message edited by: arnel nicolas ]
|
 |
Rekha Pande
Ranch Hand
Joined: Jan 29, 2004
Posts: 145
|
|
But i'm using jsp ... shall i be directing the JSP file to a servlet and over there call the PDF file for opening in the broswer .... please codes will be appreciated..!!! Thnxs...!
|
 |
Anupreet Arora
Ranch Hand
Joined: Jun 17, 2003
Posts: 81
|
|
If you know the name and location of the pdf on the server, and if that is in the webapp on your server, then you can probably use a frame in your JSP, and try to give the name and location of the pdf in the source attribute of the frame tag. This will force the pdf to open inside the browser. Hope this helps !! Rgds, Anupreet
|
 |
Rekha Pande
Ranch Hand
Joined: Jan 29, 2004
Posts: 145
|
|
Hi Anupreet & all You had mentioned to call the pdf file from a frame..... well i'm not quite aware as to how to go bout this thing... so can u plz write a code..so i'll have a better idea.... and yes... i know the pdf file name and the server location... How i would call it from a frame.....plz guide me on this issue...! Thnxs...!
|
 |
Rekha Pande
Ranch Hand
Joined: Jan 29, 2004
Posts: 145
|
|
|
Ok.. I tried with the iframe Tag ...and it worked perfectly...... Thanxs....anupreet and all....!!!
|
 |
 |
|
|
subject: opening a created PDF in internet browser
|
|
|