There were questions on that but not recently and technology must have gone ahead since then.
Requirements:
generating pdf documents based on predefined template (I can use either pdf forms or xsl-fo)
being able to fill textual data
being able to fill graphical data (generated bar codes)
being able to alter pdf template in production environment without patching (recompiling)
generating pdf file to be saved in the database (as blob) and/or printed
open source/free
The options assumed are iText, PDFBox, FOP, anything else? What are recommendations based on the requirements above?
解决方案
iText; nowadays iText is a commercial library, the latest version is not for free anymore
FOP; I worked a lot with FOP. It's fairly resource intensive (Java > XML > XSLT > PDF) and complex PDFs become a nightmare ( may result in XSLTs with 20k+ LoC)
PDFBox; it seems to be the best alternative although I did not work with it in large projects
Did not check Flying Saucer yet
To conclude, I'd give PDFBox a try. Depending on your bar code requirements you may need to inline your barcode (font) into the PDF or distribute the font to your clients - take care of those issues.