-
Replace QPDFXRefEntry with a std::variant of structs.
-
Temporarily disable 3 specific-bugs tests. Remove 'xref size mismatch' test.
-
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.
-
Rename to Xref_table::process_section. Process trailer processing subsection entries.
-
Calculate all subsections before reading subsection entries. Duplicates some warnings for the time being.
-
Rename to Xref_table::subsection. Return results instead of using out parameters. Take on responsibility for throwing exception and calculation of offset of first subsection entry.
-
Also, remove redundant clearing of the xref tabl during QPDF destruction.
-
Do not remove object from xref table as this is only required when the the method is called from within QPDF::Xref_table.
-
To be encapsulated later.
-
Also, when recovering trailer from xref streams, pick the last valid trailer encountered rather than the first.
-
Fix handling of hybrid reference files in QPDF::read_xrefTable
-
Fix QPDF::recoverStreamLength
-
Tidy QPDF_Stream
-
1. Make class final 2. Pass og parameter by value 3. Properly initialize qpdf and og Also, tweak QPDF::replaceObject to allow stream replacement without violating the requirement that streams must always be indirect objects. Also, remove QPDF::reserveStream as it does not do what the name implies and having this as a separate methods does not aid code readability.
-
Ensure the the recovered stream end is not part of a different object. Test file is bad24.pdf with stream 4 'endstream' corrupted.
-
QPDF::read_xrefTable ignores type 0 entries for objects in a section if an associates XRefStm has an entry for the same object. The spec states: When the conforming reader searches for an object, if an entry is not found in any given standard cross-reference section, the search shall proceed to a cross-reference stream specified by the XRefStm entry before looking in the previous cross-reference section, If a deleted entry is found in a section, the XRefStm is not searched according to the standard.