Trace a PDF cross-reference stream to an older table
Admin ·
Trace the cross-reference index as it was recorded in a PDF. Use the section offsets and storage fields to distinguish current revisions and object locations.
Start at the final xref offset
Select Load example and Read cross-reference sections. The terminal startxref points to byte 1261, an xref stream. Its /Prev points to byte 841, the older classic cross-reference table.
The latest stream has five recorded rows. The older table has nine. Together they describe fourteen revision rows. The current live inventory is a separate count.
Download the two-revision PDF fixtureAdobe PDF 32000-1 reference for cross-reference tables and streamsPDF Association errata clarifying cross-reference offsets
Compare byte offsets and object-stream indices
In the latest section, set Entry type to Compressed. Object 10 has no direct offset. It is entry index 0 in object stream 9. Change the filter to Direct to see that the container starts at byte 1084.
Choose the older table under Section to inspect. Object 8 has a direct byte offset there, while the newer stream marks it Free with generation 1.
| Recorded section | Offset | Evidence |
|---|---|---|
| Latest stream | 1261 | Object 10 is stored in stream 9 |
| Earlier table | 841 | Object 8 had a direct offset |
Download the two-revision PDF fixtureAdobe PDF 32000-1 reference for cross-reference tables and streams
Check all recorded rows in the CSV
Download pdf-xref-entries.csv. It includes fourteen rows across both sections, even if the preview currently filters to one type. Match section_offset, storage and byte_offset against the visible evidence.
For a damaged file, a direct offset can fail to match an object header. This identifies an index inconsistency. Use a repair workflow when you need to rebuild an unreadable PDF.
Download the two-revision PDF fixtureAdobe PDF 32000-1 reference for cross-reference tables and streamsPDF Association errata clarifying cross-reference offsets
Common questions
Does the viewer look for objects when startxref is wrong?
It requires the recorded marker and reads the section at that offset. A damaged-marker message leaves repair to another tool.
Can I see an encrypted PDF’s cross-reference index?
Yes when the recorded sections are readable. The index report keeps the PDF’s encrypted object contents untouched.