mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-22 16:18:08 +02:00
#3248: fixes hp scanner's bad XRef
This commit is contained in:
parent
c3030dee8f
commit
c3096d98d4
1 changed files with 6 additions and 0 deletions
|
@ -587,6 +587,12 @@ var XRef = (function XRefClosure() {
|
|||
delete tableState.entryCount;
|
||||
}
|
||||
|
||||
// Per issue 3248: hp scanners generate bad XRef
|
||||
if (first === 1 && this.entries[1] && this.entries[1].free) {
|
||||
// shifting the entries
|
||||
this.entries.shift();
|
||||
}
|
||||
|
||||
// Sanity check: as per spec, first object must be free
|
||||
if (this.entries[0] && !this.entries[0].free)
|
||||
error('Invalid XRef table: unexpected first object');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue