From: notmasteryet Date: Fri, 2 Dec 2011 21:35:18 +0000 (-0600) Subject: Fixing lint errors; extra empty lines X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=01a96fdddf6f979b47fd04ad431e0fdf224478b8;p=pdf.js.git Fixing lint errors; extra empty lines --- diff --git a/src/obj.js b/src/obj.js index 9544bea..474b543 100644 --- a/src/obj.js +++ b/src/obj.js @@ -518,12 +518,15 @@ var XRef = (function xRefXRef() { readXRef: function readXref(startXRef) { var stream = this.stream; stream.pos = startXRef; + try { var parser = new Parser(new Lexer(stream), true); var obj = parser.getObj(); + // parse an old-style xref table if (isCmd(obj, 'xref')) return this.readXRefTable(parser); + // parse an xref stream if (isInt(obj)) { if (!isInt(parser.getObj()) || @@ -533,9 +536,10 @@ var XRef = (function xRefXRef() { } return this.readXRefStream(obj); } - } catch(e) { + } catch (e) { log('Reading of the xref table/stream failed: ' + e); } + warn('Indexing all PDF objects'); return this.indexObjects(); },