JSP & ORACLE
Can any one tell How to generate the output as a PDF output instead of html file.
If possibe, can you pl. give some code.
Thanks in Advance
One way to solve your problem is to generate your HTML file and then use a conversion tool to convert it to pdf.
Got to www.netscape.com and do a search on "html to pdf".
There are a number of tools available.
On Windows, a great way to do this is to download the driver for the PDFWriter printer driver. And when you go to print, use the PDFWriter driver as your device. You supply it with a document name and target location and it will create the PDF for you.
You don't get tables of contents or bookmarks, though. If you want that, you'll have to use Acrobat.
Not sure if this would fit with your requirements, but you could use Oracle Reports. This is a reporting tool, allowing you to create reports from a Reports Builder tool from information in the database, rendered to HTML and sent to the clients browser. There is a servlet that Oracle provides which allows users to invoke the report to be generated, and the reponse is sent back to the client browser.
sorry, meant rendered to PDF (although it does do HTML, CSV etc. etc.)
no....you need a special set of classes to do that....
probably a JAR file....
there was an article in either JDJ or JavaPro recently...
someone has already done that !!!
Raj, your question made me curious, so with a little help from Google, I was able to find this website. It's a jar file containing Java code to read/write PDF files. Give it a read and see if it is of any benefit. I plan to do the same:
Raj, another one:
I noticed that both these are GPL, which places limitations on their use in commercial software.
I've used FOP (from the Apache project) with success.
It uses standard XSL:FO to transform XML documents into PDF.
The release I used was not very feature-rich, but there is a new one that looks more complete.