We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents c757eed + a63814e commit 9c012f8Copy full SHA for 9c012f8
src/core.js
@@ -399,9 +399,14 @@ var PDFDocument = (function PDFDocumentClosure() {
399
var length = this.stream.length;
400
var linearization = false;
401
if (length) {
402
- linearization = new Linearization(this.stream);
403
- if (linearization.length != length)
404
- linearization = false;
+ try {
+ linearization = new Linearization(this.stream);
+ if (linearization.length != length)
405
+ linearization = false;
406
+ } catch (err) {
407
+ warn('The linearization data is not available ' +
408
+ 'or unreadable pdf data is found');
409
+ }
410
}
411
// shadow the prototype getter with a data property
412
return shadow(this, 'linearization', linearization);
0 commit comments