Opened 19 months ago
Closed 19 months ago
#21221 closed enhancement (fixed)
qpdf-12.0.0
| Reported by: | Bruce Dubbs | Owned by: | Douglas R. Reno |
|---|---|---|---|
| Priority: | normal | Milestone: | 12.4 |
| Component: | BOOK | Version: | git |
| Severity: | medium | Keywords: | |
| Cc: |
Description
New major version.
Change History (4)
comment:1 by , 19 months ago
| Owner: | changed from to |
|---|---|
| Status: | new → assigned |
comment:2 by , 19 months ago
comment:3 by , 19 months ago
The only package that we have which uses is libcupsfilters, and it seems to work fine :)
comment:4 by , 19 months ago
| Resolution: | → fixed |
|---|---|
| Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.

From Github:
This is qpdf version 12.0.0. This release has no functional changes beyond a few small bug fixes. This release includes minor breaking changes to ABI (binary interface) and API (source interface) to remove some deprecated functions, improve efficiency, and set the stage for future enhancements. Most code will not be affected, and all the changes have easy fixes that are documented in the release notes. If you are updating your code from a version earlier than 10.6.0, you will have to deal with the PointerHolder transition. If you ran version 11 and are already setting POINTERHOLDER_TRANSITION to 4, you can remove that. A full discussion can be found in the manual in the Smart Pointers section. This version of qpdf still builds with C++-17 compiler, but we will be switching the minimum version to C++-20 soon, but no earlier than April 2025.
Release notes:
12.0.0: March 9, 2025 API: breaking changes 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. The deprecated QPDFObjectHandle::replaceOrRemoveKey method has been removed since it was identical to QPDFObjectHandle::replaceKey. 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. The deprecated versionless overload of QPDFObjectHandle::getJSON has been removed. 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. QIntC.hh contained the typo substract in function names, which has been fixed to subtract. The protected QPDFObjectHelper::oh data member has been replaced with the new accessor method QPDFObjectHelper::oh(). 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 Upcasting to QPDFObjectHelper and QPDFDocumentHelper is not supported. Their destructors will be made protected in version 13. 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. 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 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 In object streams, ignore objects with invalid offset. Report objects with invalid id or offset. Library Enhancements 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. Most QPDFObjectHandle accessor methods are now const qualified. 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. All object helper classes are now explicitly convertible to QPDFObjectHandle. Build Changes 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 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. There has been significant refactoring of how qpdf internally iterates over arrays and dictionaries. 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.