-
Refactored several classes to use C++11 `final` specifiers for inheritance restrictions and added default member initializations. These changes enhance code clarity, improve safety, and ensure modern coding practices.
-
Replaced std::shared_ptr<char> with std::string for passwords in QPDFJob. This simplifies memory management and aligns the implementation with modern C++ standards, improving code readability and maintainability.
-
Replaced shared pointer usage with a plain std::string for passwords in PageSpec to simplify code and enhance readability. Updated relevant logic and function calls to align with this change, removing unnecessary shared pointer management. Updated TODO to reflect completion of this modernization step.
-
Replaced `std::shared_ptr<char>` with `std::string` for password fields to simplify memory management and improve clarity. Updated relevant method implementations and function calls accordingly. This change ensures more straightforward and safer password handling throughout the codebase.
-
Replaced raw shared pointers with std::string for `infilename` to improve simplicity and readability. Added a boolean `empty_input` flag to explicitly track empty input cases. Adjusted related logic and function calls accordingly for consistency.
-
Replaced shared_ptr<char> with std::string for `outfilename` in QPDFJob, simplifying its usage and reducing unnecessary memory management overhead. Updated related conditional checks and logic to align with the updated type. These changes improve code readability and maintainability.
-
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.
-
When validating the pages tree after xref recovery do not tree dictionaries as page objects if more than 2 of the following are true: - the dictionary is direct - the /Type entry is missing or is not /Page - the dictionary does not contain a valid /Parent entry - the dictionary does not contain or inherit a valid /MediaBox - the dictionary does not contain or inherit a /Resources dictionary Such dictionaries are very unlikely to be page objects and trying to process them may cause excessive run time and memory usage.
-
Refine xref table reconstruction
-
During xref table reconstruction ignore uncompressed object entries found in xref streams. The xref table gets populated with entries for the objects actually found in the file. The entries for uncompressed object in xref streams are redundant and potentially incorrect.
-
Return the display value if the choices entry is an array of strings rather than a single string. Test file is need-appearances.pdf modified to contain one array entry.
-
Thanks to github user @cdosborn for the basic enhancement.
-
Only top-level XMP metadata is supposed to be left unencrypted. All other metadata is not treated specially.
-
Internally use -1 to represent a missing offset and provide a constructor overload that allows 0 as a valid offset. In QPDF::damagedPDF use the new overload.
-
... to remove the /Root /StructTreeRoot and /MarkInfo entries.
-
... 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
-
... containing objects with no white-space between them. To enforce the rule that objects end at the start-offset of the next object, each object is parsed in it own object stream. To facilitate this, a new private API input source is::OffsetBuffer has been added which only contains the object but reports offsets relative to the start of the object stream. This is adapted from OffsetInputSource by changing the direction of the offset, endowing it with its own BufferInputSource and striooing out checks duplicated in BufferInputSource. Fixes the expected failure in the test case added in #1266.
-
Only build strings when needed.
-
Refine recovery from missing startxref (fixes #1335)
-
Refactor xref table reconstruction (Fixes #1362)
-
Improve support for reading into std::string objects.
-
Move qpdf private inline methods to private header file.
-
If startxref cannot be found in the last 1024 try finding it in the whole file and check whether it is valid.