iText is a library that allows you to generate PDF files on the fly.The most recent version is iText 5.0.3iText is an ideal library for developers looking to enhance web- and other applications with dynamic PDF document generation and/or manipulation. iText is not an end-user tool
You can use iText to:
Serve PDF to a browser
Generate dynamic documents from XML files or databases
Use PDF's many interactive features
Add bookmarks, page numbers, watermarks, etc.
Split, concatenate, and manipulate PDF pages
Automate filling out of PDF forms
Add digital signatures to a PDF file
http://www.roseindia.net/java/itext/index.shtml
import com.lowagie.text.pdf.*;
import com.lowagie.text.*;
public class HelloWordPDF
{
public static void main(String arg[])throws Exception
{
Document document=new Document();
PdfWriter.getInstance(document,new FileOutputStream("hello.pdf"));
document.open();
document.add(new Paragraph("Hello Pdf"));
document.close();
}
}