Sunday, 15 September 2013

Comparison of Java based PDF generation frameworks



What is PDF

Portable Document Format (PDF) is an open standard for document exchange. This format was created by Adobe Systems in 1993. It is used for representing documents which are independent of application s/w, hardware and operating systems. This format provides a page-by-page view of documents, exactly as they appear in their printed form, as well as allowing keyword search.


Java Based PDF frameworks selected for comparison



Following PDF frameworks are considered for comparison:


       Apache FOP (Formatting Objects Processor)

       Apache PDFBox

       iText

       jPDFWriter

Comparison of Supported Features



Apache FOP
PDFBox
iText
jPDFWriter
Create
Update
X
Merge
X
Encrypt
Image
JavaScript
X
Bookmark
HTML to PDF
X
X
X
X
 



Performance


The below chart lists the time taken to generate 2000 similar PDFs. The figures below are tentative.


Framework
Time (in ms) for generating 2000 similar PDFs*
Apache FOP
094424
Apache PDFBox
061781
iText
015537
jPDFWriter
123236



Note: The performance test is performed on iCore-5 machine having 4GB RAM. BEA JRockit (R) (build R26.0.0-189_CR269406-59389-1.5.0_04-20060322-1120-win-ia32, ) with default JVM settings is used.

CPU & Memory Usage

Apache FOP


Apache PDFBox 

 iText

jPDFWriter

 

Average CPU Utilization Comparison


Commercials


Framework
Cost
Apache FOP
Free
Apache PDFBox
Free
iText
$2000/Server + 20% annual support (for commercial use)
jPDFWriter
$350 per license per CPU pair + 22% annual support

Note: These are approximate prices may get change in future.