1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 22:58:07 +02:00

Merge pull request #11335 from Snuffleupagus/issue-11330

Subtract `stream.start` when getting the `startXRef` property for documents with a Linearization dictionary (issue 11330)
This commit is contained in:
Tim van der Meij 2019-11-16 13:56:01 +01:00 committed by GitHub
commit be02e67972
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 1 deletions

View file

@ -453,7 +453,7 @@ class PDFDocument {
// Find the end of the first object.
stream.reset();
if (find(stream, 'endobj', 1024)) {
startXRef = stream.pos + 6;
startXRef = (stream.pos + 6) - stream.start;
}
} else {
// Find `startxref` by checking backwards from the end of the file.

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",