Quantcast
Channel: Adobe Community : Popular Discussions - PDF Language and Specifications
Viewing all articles
Browse latest Browse all 46145

Object reference in the xref table is in offset to the actual reference of the objects

$
0
0

Hi

 

Im trying to parse a PDF file. The goal is to automatically mark sections of the document to make it easier for a reader to spot the important sections of the document.

 

I read the PDF file by making an AJAX call then storing the responseText in a variable.

 

I the find the reference to the xref table and try to get to the xref table using that reference.

 

The thing is that the reference at the startxref section of the doc is showing "startxref 275815%%EOF" but the actual reference to the xref table is different, if I do "...indexOf('xref')" its showing 265798 (a difference of 10017) and all the references in the xref tables are also offset by the same amount.

 

Any hints on the source of that difference ?

 

What am I doing wrong ?

 

Thanks

 

Erez


Viewing all articles
Browse latest Browse all 46145

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>