1
0
Fork 0
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:
Jonas 2013-08-16 16:32:40 +02:00
parent abe00cbc76
commit 628f4aaf81
3 changed files with 15 additions and 2 deletions

View file

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