diff --git a/src/core/parser.js b/src/core/parser.js index f7e14675d..bb2f17837 100644 --- a/src/core/parser.js +++ b/src/core/parser.js @@ -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; diff --git a/test/pdfs/issue1293.pdf.link b/test/pdfs/issue1293.pdf.link new file mode 100644 index 000000000..3ed159afc --- /dev/null +++ b/test/pdfs/issue1293.pdf.link @@ -0,0 +1 @@ +http://dl.dropbox.com/u/22242495/pdfjs/pdfkit_uncompressed.pdf diff --git a/test/test_manifest.json b/test/test_manifest.json index c25ed5a1c..18b5f3024 100644 --- a/test/test_manifest.json +++ b/test/test_manifest.json @@ -23,6 +23,16 @@ "rounds": 1, "type": "text" }, + { "id": "issue1293", + "file": "pdfs/issue1293.pdf", + "md5": "0a744b3bbf2fd8da0131fd3c01dd1e30", + "rounds": 1, + "link": true, + "firstPage": 1, + "lastPage": 1, + "type": "load", + "about": "PDF with undefined stream length." + }, { "id": "issue2881", "file": "pdfs/issue2881.pdf", "md5": "ea6ade27d2cb146676d23dcd6605d5ee",