Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG: Resolve IndirectObject when it refers to a free entry (#1054)
From the PDF 1.7 docs https://opensource.adobe.com/dc-acrobat-sdk-docs/standards/pdfstandards/pdf/PDF32000_2008.pdf: Section 7.3.10 Indirect Objects: An indirect reference to an undefined object shall not be considered an error by a conforming reader; it shall be treated as a reference to the null object. And section 7.5.4 Cross-Reference Table: There are two ways an entry may be a member of the free entries list. Using the basic mechanism the free entries in the cross-reference table may form a linked list, with each free entry containing the object number of the next. The first entry in the table (object number 0) shall always be free and shall have a generation number of 65,535; it is shall be the head of the linked list of free objects. The last free entry (the tail of the linked list) links back to object number 0. Using the second mechanism, the table may contain other free entries that link back to object number 0 and have a generation number of 65,535, even though these entries are not in the linked list itself. Those entries form a linked list. The correct way to handle this is to resolve the indirect reference to the NullObject. See "3.4.3 Cross-Reference Table" in the PDF 1.7 standard for free cross-reference entries in general. Co-authored-by: Harry Karvonen <harry.karvonen@onebyte.fi> Closes #521 Closes #1034
- Loading branch information