• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

opening a created PDF in internet browser

 
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 149
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try writing the file to the ServletOutputStream of your response. :roll:
[ July 21, 2004: Message edited by: arnel nicolas ]
 
Rekha Pande
Ranch Hand
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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...!
 
Ranch Hand
Posts: 81
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 145
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ok.. I tried with the iframe Tag ...and it worked perfectly...... Thanxs....anupreet and all....!!!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic