license: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the “License”); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
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.0.23 (or 17.0.11). Testing has been done up to Java 25.
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.
In 4.0 the real lower left is taken into account instead of (0,0), see PDFBOX-6048.
If you have implemented your own ICOSVisitor
class, you'll have to implement the new visitFromObject
method. The default implementation found in 3.0 has been moved to the COSWriter
class.