-
Co-authored-by: m-holger <34626170+m-holger@users.noreply.github.com>
-
Introduce `qpdf::global::inspection_mode` for analyzing and repairing damaged PDFs with a restricted feature set. Update relevant code to enforce restrictions and add supporting test cases.
-
…update `CMakeLists.txt` accordingly.
-
Fix bug in #1595
-
- replace repetitive error handling with utility functions in BufferInputSource, OffsetBuffer, and QPDF_objects. - Remove some "internal error" labels from errors that could be due to user logic errors.
-
- Updated warning messages to provide clearer descriptions of common issues ("object has offset 0", "xref entry missing") and note that these are handled gracefully by qpdf. - Adjusted logic in `QPDF_objects.cc` to identify and process `xref` stream-specific anomalies accurately. Fixes #1594 Fixes #1292
-
…sting return values for uninitialized objects, and cleaning up error handling logic.
-
…oved shared pointer handling, remove deprecated object methods, and update all references.
-
…sages, and clean up `QPDF.hh`.
-
… and `findEndstream` to `Objects`, remove `QPDF::PatternFinder` class, and update related logic for improved encapsulation.
-
…, replace direct calls with `QIntC` equivalents, and clean up `QPDF.hh`.
-
…:Doc`, rename related methods, and streamline usage across QPDFWriter and linearization modules.
-
…sed_after_compressed` in `QPDF::Doc::Objects`, update usage in `QPDF_linearization`, and streamline related logic.
-
… `attempt_recovery` to `password_is_hex_key` and `suppress_recovery` to align with the CLI, update usage across the codebase, and streamline related logic.
-
…fields, replace direct member access across the codebase, and streamline related logic.
-
…te usage throughout the codebase, and streamline configurations.
-
… streamline error handling, and improve encapsulation.
-
Relocate `Objects` to `QPDF::Doc` for improved encapsulation of object-related logic. Adjust all relevant methods and references to use the new placement.
-
…deliberately broken files more efficiently.
-
…`, and simplify member access.
-
…lize type conversions, and improve clarity across multiple modules.
-
…eams, improving robustness against damaged PDFs.
-
…string`, improving performance, simplifying stream data handling, and reducing dependency on `BufferInputSource`.
-
…std::string_view`, improving performance and code clarity.
-
…cess for consistency and readability.
-
Simplify `readObjectAtOffset` by splitting responsibilities into separate functions: `read_object_start` and a streamlined `readObjectAtOffset`. Remove redundant parameters and improve code readability, ensuring better modularity for object reading operations.
-
After xref reconstruction treat the input file as suspect and apply sanity checks to all subsequent object reads. Remove `in_xref_reconstruction` flag and update references to use `reconstructed_xref` for simplified state management during xref processing. Adjust warnings for invalid dictionary keys in test output.
-
the xref table has been loaded
-
Detect corrupt xref streams early to avoid excessive runtime and memory usage.
-
Backup and restore the xref table during attempted startxref recovery to avoid corrupt states. Added a guard condition to handle invalid xref entries types, preventing processing of unsupported cases. These changes improve robustness during PDF parsing and recovery.
-
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.