1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-21 15:48:06 +02:00

Subtract stream.start when getting the startXRef property for documents with a Linearization dictionary (issue 11330)

For documents with a Linearization dictionary the computed `startXRef` position will be relative to the raw file, rather than the actual PDF document itself (which begins with `%PDF-`).
Hence it's necessary to subtract `stream.start` in this case, since otherwise the `XRef.readXRef` method will increment the position too far resulting in parsing errors.
This commit is contained in:
Jonas Jenwald 2019-11-16 02:07:02 +01:00
parent f7aafcb218
commit 9199b02a42
3 changed files with 10 additions and 1 deletions

View file

@ -0,0 +1 @@
https://github.com/mozilla/pdf.js/files/3844109/9069_10755570.1.pdf

View file

@ -2992,6 +2992,14 @@
"lastPage": 1,
"type": "eq"
},
{ "id": "issue11330",
"file": "pdfs/issue11330.pdf",
"md5": "03a8a53d4b0dc825e08554f5c0178308",
"rounds": 1,
"link": true,
"lastPage": 1,
"type": "eq"
},
{ "id": "issue4890",
"file": "pdfs/issue4890.pdf",
"md5": "1666feb4cd26318c2bdbea6a175dce87",