iText generates pdf dynamically, ideally this framework is very useful for developer who wants to enhance thier web application developement with dyanamic pdf generation based on user inputs on the fly.
Using iText, you can able to generate, maniulate and parse the pdf file. And, please remember, this is not an end user tool to view pdf files. To use this framework you should have installed Acrobat PDF software from Adobe Systems.
Enough said, we will get into the code and make our hands diryt. okay.
Download latest iText jar file Click here , and put it in your project's classpath
First, you need to create document object
com.lowagie.text.Document document = new com.lowagie.text.Document();Second, create PDFWriter object by passing document, and give pdf file name you want to create
com.lowagie.text.pdf.PdfWriter.PdfWriter.getInstance(document, newThird, open the document to start writing
FileOutputStream("HelloWorld.pdf"));
document.open();Fourth, add a paragraph to your document
document.add(new Paragraph("Hello Ramraj...."));Finally, you need to close the document
document.close();
Probably, some time later, I will attach the full source code :-)
Enough staying at office, I gotta go home, bye