mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
Merge pull request #5910 from jordan-thoms/fix-concatenated-files
Fix error reading concatenated pdfs
This commit is contained in:
commit
d484ebd492
4 changed files with 14 additions and 6 deletions
|
@ -1061,12 +1061,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);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue