Details
-
Type: Bug
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 5.1.2
-
Fix Version/s: 6.0
-
Component/s: Core/Parsing
-
Labels:None
-
Environment:PRO
Description
A client has sent us a PDF file that contains both an XRefStm and xref table. Save annotations works as expected on the first save. Opening the saved document and writing new annotations results in a file that only renders the most recently added annotations.
Further investigation is needed.
Further investigation is needed.
The missing annotation issue is related to how we are writing the trailer dictionary. When we copy the dictionary entries from the previous trailer we update the prev byte offset and update the size. As a result the XrefStm key and value get copied across which changes the object reference precedence. The correct behavior is to leave the XrefStm value on the original trailer and when loaded the accompanying XrefStm table can be used, if used before essentially overwrite any previously added xref tables.