tags:

views:

73

answers:

6

I'm looking for 2 or 3 of the most common/industry wide used libraries for the Java platform for the creation of PDFs on the fly.

The one requirement I'm focusing on is the ability to use specific formatting such as page layout and font sizes and typefaces (this will be a dynamically created legal document with frustratingly specific type standards).

I'm not actually going to be the one implementing this (I'm not a Java developer), but am trying to get the ball running and need to pass along some things to have our dev team to start investigating.

I'm investigating iText at the moment, which seems to be a well established option. I'm not yet sure how robust/flexible the templating abilities are, though.

EDIT: I just realized that there's probably no one 'right' answer for this question so maybe htis is better as part of the Wiki.

+2  A: 

Take a look at Apache FOP. Very powerful.

tob
+4  A: 

iText is probably the best all around free tool.

PDFLib is another choice if you are willing to pay for the license. It has a bit more features and has a native implementation backing the Java API.

There is always FOP (from apache) if you are willing to deal with XSLT and XSL-FO, but I believe they haven't updated those engines in a while.

Gennadiy
+2  A: 

I agree that iText is a great tool. However, the current version of iText is not free if you intend to use it in a closed source project. See Wikipedia:

In the end of 2009, iText version 5 is released under Affero GPL license. This license is drastically different from the previous license that iText had been distributed under, in that it requires anyone using iText 5 under a free license to provide the users with the full source of their application. Projects that do not want to provide their source code are required to purchase a commercial license for a non-disclosed price or they cannot upgrade to iText 5.

However, you may still use iText 4 under the LGPL license.

fabstab
Good info. At the moment, the license or cost isn't a primary concern. Just that it can accommodate a decent level of document formatting.
DA
+1  A: 

IText will probably serve most of your purposes. However, if you are looking to convert from rtf or doc to pdf, you can use a java plugin for open source tools like OpenOffice( openoffice.org)

Hope this is helpful, R

Roy
A: 

iText is probably your #1 standard in this area. You might also consider JODReports or Docmosis since they can do template-based reporting using standard word processor documents as templates.

jowierun
A: 

Have you considered http://jasperforge.org/

c0mrade