Work in progress! There isn't any release of the 4.0 version yet. Nevertheless we already provide a migration guide. It will be improved over time. If you believe there is a missing topic, open an issue or help us with a contribution to improve the guide.
This guide describes the updates in Apache PDFBox 4.0 version. Use the information provided to upgrade your PDFBox 3.x applications to PDFBox 4.0. It provides information about the new, deprecated and unsupported features in this release.
PDFBox 4.0 requires at least Java 11. Testing has been done up to Java 20.
All libraries on which PDFBox depends are updated to their latest stable versions:
For test support the libraries are updated to
This section explains the fundamental differences between PDFBox 4.0 and 3.x releases.
The subproject Preflight was removed due to inactivity. There weren't any substantial changes or improvements in the past years. The parser was still limited to PDF/A 1B.
People looking for an open source preflight solution might check VeraPDF. The VeraPDF parser is based on a PDFBox fork and was stream lined to fit their needs. But VeraPDF is still using the PDFBox parser as possible alternative.
Apache Commons Logging was replaced by Apache Log4j, some of the obvious reasons were
PDFBOX-5695 provides more details about the reasons and the transition itself.