1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-26 01:58:06 +02:00

Removes "too many inline images" limit

This commit is contained in:
Yury Delendik 2012-12-07 12:19:43 -06:00
parent 0910c5e68e
commit d71c702dcf
5 changed files with 230 additions and 53 deletions

View file

@ -28,7 +28,6 @@ var Parser = (function ParserClosure() {
this.lexer = lexer;
this.allowStreams = allowStreams;
this.xref = xref;
this.inlineImg = 0;
this.refill();
}
@ -153,15 +152,6 @@ var Parser = (function ParserClosure() {
}
}
// TODO improve the small images performance to remove the limit
var inlineImgLimit = 500;
if (++this.inlineImg >= inlineImgLimit) {
if (this.inlineImg === inlineImgLimit)
warn('Too many inline images');
this.shift();
return null;
}
var length = (stream.pos - 4) - startPos;
var imageStream = stream.makeSubStream(startPos, length, dict);
if (cipherTransform)