Path to this page:
./
print/qpdf,
Structural, content-preserving transformations on PDF files
Branch: CURRENT,
Version: 12.3.0,
Package name: qpdf-12.3.0,
Maintainer: pkgsrc-usersQPDF is a command-line program that does structural, content-preserving
transformations on PDF files. It could have been called something like
pdf-to-pdf. It also provides many useful capabilities to developers of
PDF-producing software or for people who just want to look at the innards of a
PDF file to learn more about how they work.
QPDF is capable of creating linearized (also known as web-optimized) files and
encrypted files. It is also capable of converting PDF files with object streams
(also known as compressed objects) to files with no compressed objects or to
generate object streams from files that don't have them (or even those that
already do). QPDF also supports a special mode designed to allow you to edit the
content of PDF files in a text editor. For more details, please see the
documentation links below.
QPDF includes support for merging and splitting PDFs through the ability to copy
objects from one PDF file into another and to manipulate the list of pages in a
PDF file. The QPDF library also makes it possible for you to create PDF files
from scratch. In this mode, you are responsible for supplying all the contents
of the file, while the QPDF library takes care off all the syntactical
representation of the objects, creation of cross references tables and, if you
use them, object streams, encryption, linearization and other syntactic details.
Required to run:[
graphics/jpeg] [
devel/pcre]
Master sites:
Filesize: 19180.761 KB
Version history: (Expand)
- (2026-01-18) Updated to version: qpdf-12.3.0
- (2025-08-16) Updated to version: qpdf-12.2.0
- (2025-07-15) Package has been reborn
- (2025-07-15) Package deleted from pkgsrc
- (2025-04-24) Updated to version: qpdf-11.10.1nb1
- (2025-02-27) Updated to version: qpdf-11.10.1
CVS history: (Expand)
| 2026-01-18 15:53:46 by Ryo ONODERA | Files touched by this commit (4) |
Log message:
print/qpdf: Update to 12.3.0
Changelog:
I have released qpdf 12.3.0. This release contains accumulated bug
fixes and small enhancements as well as significant internal
refactoring.
Notes for maintainers:
* For this release and the remainder of the 12.x cycle, we are
signing releases with gpg and cosign. Starting with 13, we will
only sign releases with cosign. This is mentioned in the release
notes.
* It is my hope to deprecate external-libs in favor of vcpkg for
Windows builds before the next release.
|
| 2025-08-16 02:57:04 by Ryo ONODERA | Files touched by this commit (4) |
Log message:
print/qpdf: Update to 12.2.0
Changelog:
12.2.0: May 4, 2025
+ Upcoming C++ Version Change
o This is expected to be the last minor release of qpdf to work with
C++-17. We will be switching to C++-20 for 12.3.0.
+ Bug fixes
o In QPDF::getAllPages detect shared /Kids arrays to avoid stack
overflows in (specially constructed) damaged input files.
o Fix severe performance issues in QPDFFormFieldObjectHelper with
some (specially constructed) damaged input files.
o Add missing QPDFFormFieldObjectHelper::isChecked implementation.
o Fix bug in QPDFNameTreeObjectHelper / QPDFNumberTreeObjectHelper.
Under certain conditions tree insertions resulted in a /Range entry
being written to the tree root node, which is not permitted. One of
the possible consequences is that some readers would not recognize
embedded / attached files.
o In QPDFFormFieldObjectHelper::getChoices return the display string
if an /Opt entry is a pair of export value and display string
rather than a single string representing both values. Previously no
value was returned if the entry was not a single string.
+ Build fixes
o Improve experience for local development on Windows. Perl is no
longer required to build when using MinGW. qpdf should build ??out
of the box?? on Windows with an IDE such as JetBrains CLion that
bundles mingw or that uses an installation of Visual Studio. Perl
and a POSIX-like environment such as msys2 is still required to run
tests.
o Fix Android build issues.
o Fix incorrect use of jpeg library introduced with the
--jpeg-quality feature introduced in 12.1.0. This was causing build
failures on some platforms.
+ Other enhancements
o More sanity checks have been added when files with damaged xref
tables are recovered in order to avoid long runtimes and large
memory use. Objects with with very large arrays or dictionaries
(more than 5000 elements) and duplicate pages are ignored as they
are almost certainly invalid.
12.1.0: April 6, 2025
+ Bug fixes
o In QPDF::isLinearized return false if the first object in the file
is not a linearization parameter dictionary or its /L entry is not
an integer object. Previously the method returned false if the
first dictionary object was not a linearization parameter
dictionary.
o Fix parsing of object streams containing objects not separated by
white-space. Pre-2020 editions of the PDF specification incorrectly
stated that white-space was required between objects. qpdf relied
on this when parsing object streams.
o Fix two object stream error/warning messages that reported the
wrong object id.
o Accept an array for rotate in qpdf job JSON since it is a
repeatable option.
o When reading an encrypted PDF with cleartext metadata, only expect
top-level /Metadata to be clear-text. When writing an encrypted PDF
with cleartext metadata, only leave top-level unencrypted. qpdf has
always incorrectly handled all /Metadata streams as special with
cleartext metadata.
+ Library Enhancements
o Add function Pl_DCT::make_compress_config to return a
Pl_DCT::CompressConfig unique pointer to a CompressConfig from a
std::function for a more modern configuration option.
+ CLI Enhancements
o New --remove-structure option to exclude the document structure
tree from the output PDF.
o New --jpeg-quality option to set jpeg quality used with
--optimize-images.
+ Other enhancements
o There have been further enhancements to how files with damaged xref
tables are recovered.
+ Build changes
o The file .idea/cmake.xml has been removed. Instead of shipping with
some CMake profiles in the CLion-specific configuration, we now
include a CMakePresets.json. There is information about using it in
README-maintainer.md. For most users, running cmake in the normal
way is fine. Suggestions are welcome. None of the official builds
use cmake presets at the time of initial introduction.
+ Other changes
o The QPDF::optimize method is believed to be not in use and has been
deprecated. If you are relying on it please open a ticket.
o The parsing of object streams including the creation of error/
warning messages and object descriptions has been refactored with
some improvement both in runtime and memory usage.
o There has been some refactoring of QPDFWriter including how object
streams are written with some performance improvement.
12.0.0: March 9, 2025
+ API breaking changes
o The header file qpdf/QPDFObject.hh now generates an error if
included. This is to prevent code that includes it from
accidentally working because an old version is installed somewhere
on the system. Instead of including that header, include <qpdf/
Constants.h>, and replace QPDFObject::ot_ with ::ot_ in your code.
o The deprecated QPDFObjectHandle::replaceOrRemoveKey method has been
removed since it was identical to QPDFObjectHandle::replaceKey.
o The deprecated JSON::checkDictionaryKeySeen function has been
removed. If JSON::parse encounters duplicate keys the last value is
silently accepted instead of throwing a runtime error. This is
consistent with the JSON specification.
o The deprecated versionless overload of QPDFObjectHandle::getJSON
has been removed.
o The deprecated Buffer copy constructor and assignment operator have
been removed. Buffer copy operations are expensive as they always
involve copying the buffer content. Use buffer2 = buffer1.copy();
or Buffer buffer2{buffer1.copy()}; to make it explicit that copying
is intended.
o QIntC.hh contained the typo substract in function names, which has
been fixed to subtract.
o The protected QPDFObjectHelper::oh data member has been replaced
with the new accessor method QPDFObjectHelper::oh().
o Except for abstract classes and the exceptions listed below,
sub-classing of qpdf classes is not supported. These classes were
never designed to be used as a base class and will be made final in
version 13. If you have a use case for extending one of these
classes, please open a ticket.
Exceptions:
# QPDFDocumentHelper
# QPDFObjectHelper
o Upcasting to QPDFObjectHelper and QPDFDocumentHelper is not
supported. Their destructors will be made protected in version 13.
o Catching of logic errors thrown as the result of using an
uninitialized QPDFObjectHandle is not supported. In version 13
uninitialized object handles will be treated as immutable shared
null objects. Using them will no longer throw any logic errors, but
may where appropriate generate type warnings or exceptions.
o The following are believed to be not in use and have been
deprecated. If you are relying on them please open a ticket.
# All QPDFTokenizer push-mode methods.
# QPDFObjectHandle::parse overload taking a QPDFTokenizer
parameter.
+ CLI breaking Changes
o To support the future introduction of sub-commands, the use of
filenames without extension and path element as the first argument
is no longer supported, and the result may change in the future.
For example, qpdf check out.pdf currently copies the file check to
out.pdf but may in future check out.pdf. Use qpdf ./check out.pdf
or qpdf -- check out.pdf instead.
+ Bug fixes
o In object streams, ignore objects with invalid offset. Report
objects with invalid id or offset.
+ Library Enhancements
o QPDFObjectHandle supports move construction/assignment. This change
is invisible to most developers but may break your code if you rely
on specific behavior around how many references to a
QPDFObjectHandle??s underlying object exist. You would have to
write code specifically to do that, so if you??re not sure, then
you shouldn??t have to worry.
o Most QPDFObjectHandle accessor methods are now const qualified.
o QPDFObjectHandle and all object helper classes are now explicitly
convertible to QPDFObjGen, and therefore can be passed as parameter
where a QPDFObjGen is required. Redundant overloaded methods have
been removed.
o All object helper classes are now explicitly convertible to
QPDFObjectHandle.
+ Build Changes
o If POINTERHOLDER_TRANSITION is not defined, it is now automatically
defined to 4, which completely removes PointerHolder from the API.
It is no longer included by any qpdf headers. This means code that
hasn??t completed its PointerHolder transition will get errors
unless it defines POINTERHOLDER_TRANSITION, and any file that uses
PointerHolder will have to explicitly include it rather than
relying on other headers to bring it along.
+ Other Changes
o The internal implementation of objects has been extensively
refactored, using std::variant to eliminate one level of
indirection. This has saved one shared pointer per object with some
improvement both in runtime and memory usage. A new class
BaseHandle has been added as common base class of both
QPDFObjectHandle and QPDFObjectHelper to provide common
functionality appropriate for all object-handle-like classes such
as the operator to convert to QPDFObjGen. BaseHandle is an
implementation detail and not directly usable by library users.
o There has been significant refactoring of how qpdf internally
iterates over arrays and dictionaries.
o The internal mechanism used to check object sizes for binary
compatibility between releases has been changed. As such, the
CHECK_SIZES maintainer-only build option has been removed.
|
| 2025-04-24 16:16:37 by Thomas Klausner | Files touched by this commit (2412) |
Log message:
*: recursive bump for jpeg -> libjpeg-turbo switch
|
| 2025-02-26 17:32:39 by Ryo ONODERA | Files touched by this commit (3) |
Log message:
print/qpdf: Update to 11.10.1
Changelog:
11.10.1: February 15, 2025
+ Build fixes
o Fix incorrect detection of zopfli
o Recognize cygwin perl as Windows when running test suite
11.10.0: February 8, 2025
+ Bug fixes
o Detect and break loops in the outline (bookmark) tree.
o Correctly handle outline (bookmark) items where the destination is
given as a dictionary with ??/D?? entry.
o When loading object streams, ignore any objects not included in the
xref table. The PDF specification requires any object that is not
present in the xref table to be treated as the null object.
o When writing real numbers as JSON ensure they do not end in a
trailing decimal point. Numbers with trailing ??.?? are valid PDF
format but are not valid in JSON.
o When QPDF::getObject, getObjectByObjGen or getObjectByID are called
with a QPDFObjGen that does not exists in the xref and object
tables return a direct null. Previously the methods inserted an
indirect reference to the null object in the object table,
potentially hiding a valid object with the same object id.
o Fix handling of certain deleted objects in hybrid reference files.
Previously qpdf would incorrectly load a deleted object if it was
present in a cross-reference stream specified by the /XRefStm
entry.
o Default the stream decode level to generalized. Previously the
decode level incorrectly defaulted to none, affecting both the
--decode-level CLI option and the QPDFWriter::setDecodeLevel
method.
o Reject CLI flags with parameters. Previously the parameter was
simply ignored (e.g. --encrypt=n was treated as --encrypt).
+ CLI Enhancements
o The fix-qdf command now allows an output file to be specified as an
optional second argument. This is useful for environments in which
writing a binary file to standard output doesn??t work (such as
PowerShell 5).
o New --remove-metadata and --remove-info options to exclude document
metadata and information from the output PDF.
+ Library Enhancements
o qpdf can now be built with zopfli support. For details, see Zopfli
Compression Algorithm.
o Add QPDFObjectHandle operator bool. The operator returns true if
the object handle is initialized and is a replacement for the
isInitialized method. For more details see the qpdf wiki.
o New C API function qpdf_oh_free_buffer to free malloc allocated
buffers.
+ Other enhancements
o There has been some refactoring of the processing of xref tables
during the loading of PDF files, including the reconstruction of
xref tables of damaged files. As part of this additional
validations have been added. As a result, some damaged files will
produce errors during loading rather than during later processing
or writing. Repair of damaged files has been improved.
o As part of the additional validations during the loading of PDF
files, non-dictionary objects are now automatically removed from
pages tree.
o The handling of corrupt filtered streams has changed. If a
compressed stream cannot be successfully uncompressed, qpdf will
now write the raw (encoded) stream even if decode-level generalized
or specialized is set. The result of attempting to decode a corrupt
stream is generally unusable and can be extremely large.
|
| 2024-08-25 08:19:21 by Thomas Klausner | Files touched by this commit (575) |
Log message:
*: replace CMAKE_ARGS with CMAKE_CONFIGURE_ARGS
|
2024-06-11 10:48:59 by Adam Ciarcinski | Files touched by this commit (4) |  |
Log message:
qpdf: updated to 11.9.1
qpdf 11.9.1
This is qpdf version 11.9.1. This is an accumulation of minor fixes and
performance enhancements since 11.9.0. No new functionality has been added.
|
| 2024-03-11 16:11:59 by Ryo ONODERA | Files touched by this commit (3) |
Log message:
qpdf: Update to 11.9.0
Changelog:
11.9.0:
This is qpdf version 11.9.0. This release includes some performance
optimizations and reliability enhancements to JSON support, an
enhanced command-line syntax for --pages in preparation for future
options, support for multiple overlay and underlay specifications,
and a few minor fixes and improvements to new features from qpdf
11.8.0.
11.8.0:
This is qpdf version 11.8.0. This release includes a few enhancements
and bug fixes related to page splitting and merging operations. It
is in preparation for more substantial changes in this area. This
includes more flexible collation, more flexible page range
specification, the ability to set page labels, and one bug fix
related to hyperlinks when flattening annotations.
|
| 2024-01-05 23:05:06 by Ryo ONODERA | Files touched by this commit (3) |
Log message:
qpdf: Update to 11.7.0
Changelog:
11.7.0: December 24, 2023
o Bug fixes:
# With --compress-streams=n, qpdf was still compressing cross
reference streams, linearization hint streams, and object streams.
This has been fixed.
# Fix to QPDF JSON: the syntax "n:/pdf-syntax" is now \
accepted as an
alternative way to represent names. This can be used for any name
(e.g. "n:/text#2fplain"), but it is necessary when the name
contains binary characters. For example, /one#a0two must be
represented as "n:/one#a0two" since the single byte a0 is \
not valid
in JSON.
# QPDF JSON will convert floating numbers that appear in the JSON in
scientific notation to fixed-point notation since PDF doesn??t
accept scientific notation.
# When setting a check box value, allow any value other than /Off to
mean checked. This is permitted by the spec. Previously, any value
other than /Yes or /Off was rejected.
o CLI Enhancements:
# Allow the syntax --encrypt --user-password=user-password
--owner-password=owner-password --bits={40,128,256} when encrypting
PDF files. This is an alternative to the syntax --encrypt
user-password owner-password {40,128,256}, which will continue to
be supported. The new syntax works better with shell completion and
allows creation of passwords that start with -.
# --remove-restrictions flag now also disables digital signatures in
the file.
o Build Enhancements:
# The qpdf test suite now passes when qpdf is linked with an
alternative zlib implementation. There are no dependencies anywhere
in the qpdf test suite on any particular zlib output. Consult the
ZLIB COMPATIBILITY section of README-maintainer.md for a detailed
explanation of how to maintain this.
# The official Windows installers now offers to modify PATH when
installing qpdf.
o Package Enhancements:
# A UNIX man page is now automatically generated from the
documentation. It contains the same text as qpdf --help=all.
o Library Enhancements:
# Add C++ functions qpdf_c_wrap and qpdf_c_get_qpdf to the C API to
enable custom C++ code to interoperate more easily with the the C
API. See examples/extend-c-api.
# Add methods to Buffer to work more easily and efficiently with
std::string.
# Add QPDFAcroFormDocumentHelper::disableDigitalSignatures, which
disables any digital signature fields, leaving their visual
representations intact.
11.6.4: December 10, 2023
o Bug fixes:
# When running cmake --install --component dev, install cmake files,
which were previously omitted from the dev component
# Fix the Linux binary build to use older libraries so it continues
to work in AWS Lambda and other older execution environments.
|