File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -398,10 +398,16 @@ var PDFDocument = (function PDFDocumentClosure() {
398
398
get linearization () {
399
399
var length = this .stream .length ;
400
400
var linearization = false ;
401
- if (length ) {
402
- linearization = new Linearization (this .stream );
403
- if (linearization .length != length )
404
- linearization = false ;
401
+ try {
402
+ if (length ) {
403
+ linearization = new Linearization (this .stream );
404
+ if (linearization .length != length )
405
+ linearization = false ;
406
+ }
407
+ } catch (err ) {
408
+ warn ('since pdf is broken pdf.js is trying to recover it ' +
409
+ 'by indexing the object; ' +
410
+ 'the error in firebug shall have a different origin' );
405
411
}
406
412
// shadow the prototype getter with a data property
407
413
return shadow (this , 'linearization' , linearization );
You can’t perform that action at this time.
0 commit comments