logoalt Hacker News

nogridbaglast Thursday at 5:48 PM2 repliesview on HN

I thought most were using Apache PDFBox these days. Anyone have any thoughts on how the two libraries compare in 2025? I'm particularly interested in programatic creation of PDFs.

I know historically PDFBox is a bit lower level whereas iText was a bit more user friendly, but that's not too big of a deal for me.


Replies

propter_hoclast Thursday at 8:19 PM

PDFBox is the GOAT of backend pdf libraries. We've built incredible things with it, plus pdfjs on the front-end - full compliant e-signature, templated pdf generation, in-browser pdf editing. Looked deeply at alternatives but very happy with our choice. In particular using itext vs pdfbox feels like using WordPress vs Rails - try to build anything very serious and you will be happier you picked the more capable, lower-level library.

cess11last Thursday at 6:05 PM

I use PDFBox. There are some FOSS layout libraries you probably want to add one or more of, depending on your needs.

It's disgustingly fast and capable. In one project we crunched out 150k PDF documents in less than forty minutes from roughly 6 GB input data, on a mid laptop, including a fair bit of other file types related to those documents.

Fairly low level but not hard to get started with. You might have to wrap it in a module yourself if you're using those.

show 1 reply