Shared libraries / tools for building Java-based PDFs?

I am looking for 2 or 3 of the most common / industry-wide widely used libraries for the Java platform to create PDF files on the fly.

The only requirement that I focus on is the ability to use certain formatting, such as page layout and font sizes and fonts (this will be a dynamically created legal document with unsatisfactory specific type standards).

I'm not going to be the one who implements this (I'm not a Java developer), but I'm trying to get the ball to work and I need to pass some things on so that our development team starts an investigation.

I am currently studying iText, which seems to have worked well. I'm still not sure how reliable / flexible the ability of the templates is.

EDIT: I just realized that there probably isn't a β€œright” answer to this question, so maybe it's better as part of the Wiki.

+4
source share
6 answers

iText is probably the best of all free tools.

PDFLib is another choice if you are willing to pay for a license. It has a few more features and has a built-in implementation that supports the Java API.

There is always a FOP (from apache) if you are ready to deal with XSLT and XSL-FO, but I believe that they did not update these engines at that time.

+5
source

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:

At the end of 2009, iText version 5 was released under the Affero GPL license. This license is significantly different from the previous license that iText distributed, since it requires any iText 5 user to have a free license to provide users with the full source of their application. Projects that do not want to provide their source code must purchase a commercial license for an unpublished price or cannot upgrade to iText 5.

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

+3
source

Check out the Apache FOP . Very powerful.

+2
source

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

Hope this is helpful, R

+1
source

iText is probably your No. 1 standard in this area. You can also consider JODReports or Docmosis , as they can generate reports based on templates using standard text documents in the form of templates.

+1
source
+1
source

All Articles