1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-22 16:18:08 +02:00

Fix error reading concatenated pdfs

This commit is contained in:
Jordan Thoms 2015-04-04 19:15:31 +13:00
parent 180a5a2746
commit d0ea772fc6
4 changed files with 14 additions and 6 deletions

View file

@ -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);