mirror of
https://github.com/mozilla/pdf.js.git
synced 2025-04-25 09:38:06 +02:00
Enable loading of PDFs with undefined or missing stream lengths
This commit is contained in:
parent
abe00cbc76
commit
628f4aaf81
3 changed files with 15 additions and 2 deletions
|
@ -208,8 +208,10 @@ var Parser = (function ParserClosure() {
|
|||
|
||||
// get length
|
||||
var length = this.fetchIfRef(dict.get('Length'));
|
||||
if (!isInt(length))
|
||||
error('Bad ' + length + ' attribute in stream');
|
||||
if (!isInt(length)) {
|
||||
info('Bad ' + length + ' attribute in stream');
|
||||
length = 0;
|
||||
}
|
||||
|
||||
// skip over the stream data
|
||||
stream.pos = pos + length;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue