-
Replaced raw pointer defaults (e.g., `0`) with `nullptr` for better readability and type-safety. Simplified object initializer syntax using uniform initialization `{}`. These changes enhance code maintainability and ensure modern C++ standards compliance. -
Simplified checks for empty containers and strings across the codebase using the `.empty()` method. This improves code readability and adheres to best practices for checking emptiness.
-
Converted multiple occurrences of `count()` to `contains()` throughout the codebase where the goal was to check key existence in containers. This improves code readability and aligns with modern C++ practices, particularly with C++20, making the intent more explicit and potentially aiding performance.
-
qpdf permits replacing standard stream filters with user provided filters. #1457 incorrectly removed that option.
-
Only top-level XMP metadata is supposed to be left unencrypted. All other metadata is not treated specially.
-
Rather than converting each (sequential) object id to a string, generate a string for the first id and than increment the digits in the string.
-
... and use it in QPDFWriter and QPDF::generateHintStream.
-
Also, remove redundant QPDFWriter::writeBuffer.
-
Also, - use Pl_Discard when only checking whether stream is filterable - get last char directly from output string
-
Cache output of pass 1.
-
Refactor xref table reconstruction (Fixes #1362)
-
Split reconstruction into three passes - scanning of input for objects and trailer, insertion of objects into the xref table, and loading the trailer. This allows insertion to take place in the usual reverse order and removes the need for a separate insertReconstructedXrefEntry method. It also allows trailer to be tried from most recent to oldest. Ignore any found trailers without /Root entry.
-
Except for virtual functions to avoid the need for users to update code.
-
This improves indentation of long strings. This commit also fixes some trailing whitespace in ChangeLog.
-
Fixes oss-fuzz case 394129398. Issue arose from chaining multiple runlength filters and inflating a compressed stream of ~100 bytes to several gigabytes. There is no obvious fix without imposing an arbitrary implementation limit and therefore potentially excluding valid PDF files.
-
runtime error
-
Also, fix disabling of preserve_encryption to be ignore stream_decode_level, but disable preserve_encryption if compress_streams is false. Fixes #1286
-
without filtering
-
This reverts commit ff2a78f579ebdd06b417e34260a17dba06e71137, reversing changes made to 8f54319f7a6514110f4b05cbbf1cb1c9fc8cb6a0.
-
Split reconstruction into two passes - scanning of input for objects and insertion of objects into the xref table. This allows insertion to take place in the usual reverse order and removes the need for a separate insert_reconstructed method.