QPDF Changelog

What's new in QPDF 5.1.3

May 25, 2015
  • This is just a bugfix release from 5.1.2.

New in QPDF 5.1.2 (Jun 10, 2014)

  • New example program: pdf-split-pages: efficiently split PDF files into individual pages.
  • Bug fix: don't fail on files that contain streams where /Filter or /DecodeParms references a stream. Before, qpdf would try to convert these to direct objects, which would fail because of the stream.
  • Bug fix: if the last object in the first part of a linearized file had an offset that was below 65536 by less than the size of the hint stream, the xref stream was invalid and the resulting file is not usable. This is now fixed.

New in QPDF 5.1.1 (Jun 10, 2014)

  • Bug fix: when copying foreign objects (which occurs during page splitting among other cases), avoid traversing the same object more than once if it appears more than once in the same direct object. This bug is performance-only and does not affect the actual output.

New in QPDF 5.1.0 (Jun 10, 2014)

  • Document and make explicit that passing null to QUtil::setRandomDataProvider() resets the random data provider.
  • Provide QUtil::getRandomDataProvider().
  • Allow anyspace rather than just newline to follow xref header. This allows qpdf to read a wider range of damaged files.
  • Allow user-supplied random data provider to be used in place of OS-provided or insecure random number generation. See documentation for 5.1.0 for details.
  • Add configure option --enable-os-secure-random (enabled by default). Pass --disable-os-secure-random or define SKIP_OS_SECURE_RANDOM to avoid attempts to use the operating system-provided secure random number generation. This can be especially useful on Windows if you wish to avoid any dependency on Microsoft's cryptography system.
  • If NO_GET_ENVIRONMENT is #defined, for Windows only, QUtil::get_env will always return false. This was added to support a user who needs to avoid calling GetEnvironmentVariable from the Windows API. QUtil::get_env is not used for any functionality in qpdf and exists only to support the test suite including test coverage support with QTC (part of qtest).
  • Add /FS to msvc builds to allow parallel builds to work with Visual C++ 2013.
  • Add missing #include in some files that use std::min and std::max.
  • Change image comparison tests, which are disabled by default, to use tiff files with 8 bits per sample rather than 4. This works around a bug in tiffcmp but also increases time and disk space for image comparison tests.
  • Fix MacOS compilation errors by adding a missing #include in a header file.

New in QPDF 5.0.1 (Oct 19, 2013)

  • Warn when -accessibility=n is specified with a modern encryption format (R > 3). Also, accept this flag (and ignore with warning) with 256-bit encryption. qpdf has always ignored the accessibility setting with R > 3, but it previously did so silently.

New in QPDF 5.0.0 (Jul 11, 2013)

  • 4.2.0 turned out to be binary incompatible on some platforms even though there were no changes to the public API. Therefore the 4.2.0 release has been withdrawn, and is being replaced with a 5.0.0 release that acknowledges the ABI change and also removes
  • some problematic methods from the public API.
  • Remove methods from public API that were only intended to be used by QPDFWriter and really didn't make sense to call from anywhere else as they required internal knowledge that only QPDFWriter had.

New in QPDF 4.2.0 (Jul 8, 2013)

  • Ignore error case of a stream's decode parameters having invalid length when there are no stream filters.
  • qpdf: add --show-npages command-line option, which causes the number of pages in the input file to be printed on a line by itself.
  • qpdf: allow omission of range in --pages. If range is omitted such that an argument that is supposed to be a range is an invalid range and a valid file name, the range of 1-z is assumed. This makes it possible to merge a bunch of files with something like
  • qpdf --empty out.pdf --pages *.pdf

New in QPDF 4.1.0 (Apr 15, 2013)

  • manual/qpdf-manual.xml: Document the casting policy that is
  • followed in qpdf's implementation.
  • Use ./install-sh (already present) instead of "install -c" to
  • install executables to fix portability problems against different
  • UNIX variants.
  • Add protected terminateParsing method to
  • QPDFObjectHandle::ParserCallbacks that implementor can call to
  • terminate parsing of a content stream.
  • Favor fopen_s and strerror_s on MSVC to avoid CRT security
  • warnings. This is useful for people who may want to use qpdf in
  • an application that is Windows 8 certified.
  • New method QUtil::safe_fopen to wrap calls to fopen. This is
  • less cumbersome than calling QUtil::fopen_wrapper.
  • New method QUtil::int_to_string_base to convert to octal or
  • hexademical (or decimal) strings without using sprintf
  • Rewrite QUtil::int_to_string and QUtil::double_to_string to
  • remove internal length limits but to remain backward compatible
  • with the old versions for valid inputs.
  • Bug fix: properly handle overridden compressed objects. When
  • caching objects from an object stream, only cache objects that,
  • based on the xref table, would actually be resolved into this
  • stream. Prior to this fix, if an object stream A contained an
  • object B that was overridden by an appended section of the file,
  • qpdf would cache the old value of B if any non-overridden member
  • of A was accessed before B. This commit fixes that bug.

New in QPDF 4.0.0 (Jan 3, 2013)

  • Fix long-standing bug that could theoretically have resulted in possible misinterpretation of decode parameters in streams. As far as I can tell, it is extremely unlikely that files with the characteristics that would have triggered the bug actually exist in cases that qpdf versions prior to 4.0.0 could have read. Unencrypted files with encrypted attachments would have triggered this bug, but qpdf versions prior to 4.0.0 already refused to open such files.
  • Fix long-standing bug in which a stream that used a crypt filter and was otherwise not filterable by qpdf would be decrypted properly but would retain the crypt filter indication in the file. There are no known ways to create files like this, so it is unlikely that anyone ever hit this bug.

New in QPDF 3.0.2 (Sep 7, 2012)

  • Add new method QPDFWriter::setExtraHeaderText to add extra text,
  • such as application-specific comments, to near the beginning of a
  • PDF file. For linearized files, this appears after the
  • linearization parameter dictionary. For non-linearized files, it
  • appears right after the PDF header and non-ASCII comment.
  • Make it possible to write the same QPDF object with two
  • different QPDFWriter objects that have both called
  • setLinearization(true) by making private method
  • QPDF::calculateLinearizationData() properly initialize its state.
  • Bug fix: Writing after calling QPDFWriter::setOutputMemory()
  • would cause a segmentation fault because of an internal field not
  • being initialized, rendering that method useless. This has been
  • corrected.

New in QPDF 3.0.1 (Aug 13, 2012)

  • Bug fix: let EOF terminate a literal token as well as whitespace or comments.

New in QPDF 3.0 RC 1 (Jul 30, 2012)

  • Add QPDFObjectHandle::replaceStreamData that takes
  • a std::string analogous to the QPDFObjectHandle::newStream that
  • takes a string that was added earlier.
  • Change configure to have image comparison tests disabled by
  • default. Update README and README.maintainer with information
  • about running them.
  • Add --pages command-line option to qpdf to enable page-based
  • merging and splitting.
  • Add new method QPDFObjectHandle::replaceDict to replace a
  • stream's dictionary. Use with caution; see comments in
  • QPDFObjectHandle.hh.
  • Add new method QPDFObjectHandle::parse for creation of
  • QPDFObjectHandle objects from string representations of the
  • objects. Thanks to Tobias Hoffmann for the idea.

New in QPDF 2.2.2 (Oct 5, 2010)

  • Add qpdf_read_memory to C API to call PDF::processMemoryFile.

New in QPDF 2.2.1 (Oct 4, 2010)

  • In versions 2.2.0 and earlier, there
  • were some changes in the port that modified the application binary
  • interface, but this is no longer the case with 2.2.1.

New in QPDF 2.2.0 (Aug 16, 2010)

  • Add QPDFObjectHandle::addPageContents, a convenience routine for
  • appending or prepending new streams to a page's content streams.
  • The "pdf-double-page-size" example illustrates its use.
  • Add new methods to QPDFObjectHandle: replaceStreamData and
  • newStream. These methods allow users of the qpdf library to add
  • new streams and to replace data of existing streams. The
  • pdf-double-page-size" and "pdf-invert-images" examples illustrate
  • their use.

New in QPDF 2.1.4 (Apr 19, 2010)

  • libqpdf/QPDFWriter.cc (writeLinearized): the padding calculation
  • fix in 2.1.2 was applied in only one place but it was needed in
  • two places since there are actually two cross reference streams in
  • a linearized file. The new padding calculation is now used for
  • both streams. Hopefully this should put an end to linearization
  • padding problems. (Fixes qpdf-Bugs-2979219.)

New in QPDF 2.0.6 (May 11, 2009)

  • This release includes a small bug fix so that qpdf ignores decode parameters that it doesn't understand, and leaves the streams unfiltered.

New in QPDF 2.0.5 (Mar 11, 2009)

  • Small fix to the LZW decoder.
  • Better recovery for PDF files that contain damaged streams, and it includes more information that could help an advanced user manually repair a damaged PDF file.

New in QPDF 2.0.4 (Feb 24, 2009)

  • Fixed the LZW decoder to work properly on files created without "early code change". This was previously untested due to lack of availability of input data.
  • In --check mode, qpdf now exits with a status of 3 if there are warnings but no errors
  • Improved logic of cross reference table recovery to work better for files that have appended modifications
  • Fixed many typos in comments and one in an error message