Fix error reading concatenated pdfs
This commit is contained in:
parent
180a5a2746
commit
d0ea772fc6
@ -1051,12 +1051,13 @@ var XRef = (function XRefClosure() {
|
||||
trailers.push(position);
|
||||
position += skipUntil(buffer, position, startxrefBytes);
|
||||
} else if ((m = /^(\d+)\s+(\d+)\s+obj\b/.exec(token))) {
|
||||
this.entries[m[1]] = {
|
||||
offset: position,
|
||||
gen: m[2] | 0,
|
||||
uncompressed: true
|
||||
};
|
||||
|
||||
if (typeof this.entries[m[1]] === 'undefined') {
|
||||
this.entries[m[1]] = {
|
||||
offset: position,
|
||||
gen: m[2] | 0,
|
||||
uncompressed: true
|
||||
};
|
||||
}
|
||||
var contentLength = skipUntil(buffer, position, endobjBytes) + 7;
|
||||
var content = buffer.subarray(position, position + contentLength);
|
||||
|
||||
|
1
test/pdfs/.gitignore
vendored
1
test/pdfs/.gitignore
vendored
@ -123,3 +123,4 @@
|
||||
!issue5481.pdf
|
||||
!issue5567.pdf
|
||||
!issue5701.pdf
|
||||
!issue5909.pdf
|
||||
|
BIN
test/pdfs/issue5909.pdf
Executable file
BIN
test/pdfs/issue5909.pdf
Executable file
Binary file not shown.
@ -2087,5 +2087,11 @@
|
||||
"md5": "d5b37f8bf1b3aafa1b4fcf19ebdc7c74",
|
||||
"rounds": 1,
|
||||
"type": "eq"
|
||||
},
|
||||
{ "id": "issue5909",
|
||||
"file": "pdfs/issue5909.pdf",
|
||||
"md5": "51a724136c0c10008bd061a78ea4b8fc",
|
||||
"rounds": 1,
|
||||
"type": "load"
|
||||
}
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user