From 1658918b9bd396f63f320af7e84d0e01c9e0304f Mon Sep 17 00:00:00 2001 From: Pdf Bot Date: Tue, 22 Mar 2016 20:10:39 +0000 Subject: [PATCH] PDF.js version 1.4.147 - See mozilla/pdf.js@54ee15d866812d8c9db9d5e23be654534b616fc6 --- bower.json | 2 +- build/pdf.combined.js | 49 ++++++++++++++++++------------------------- build/pdf.js | 4 ++-- build/pdf.worker.js | 49 ++++++++++++++++++------------------------- package.json | 2 +- 5 files changed, 44 insertions(+), 62 deletions(-) diff --git a/bower.json b/bower.json index 6594a1d22..723154043 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.4.145", + "version": "1.4.147", "main": [ "build/pdf.js", "build/pdf.worker.js" diff --git a/build/pdf.combined.js b/build/pdf.combined.js index 83bd6e66c..e856aa992 100644 --- a/build/pdf.combined.js +++ b/build/pdf.combined.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.4.145'; -var pdfjsBuild = '4a44a2c'; +var pdfjsVersion = '1.4.147'; +var pdfjsBuild = '54ee15d'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -21508,10 +21508,6 @@ var Jbig2Image = coreJbig2.Jbig2Image; var JpegImage = coreJpg.JpegImage; var JpxImage = coreJpx.JpxImage; -var coreParser; // see _setCoreParser below -var EOF; // = coreParser.EOF; -var Lexer; // = coreParser.Lexer; - var coreColorSpace; // see _setCoreColorSpace below var ColorSpace; // = coreColorSpace.ColorSpace; @@ -22633,6 +22629,11 @@ var DecryptStream = (function DecryptStreamClosure() { })(); var Ascii85Stream = (function Ascii85StreamClosure() { + // Checks if ch is one of the following characters: SPACE, TAB, CR or LF. + function isSpace(ch) { + return (ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A); + } + function Ascii85Stream(str, maybeLength) { this.str = str; this.dict = str.dict; @@ -22656,7 +22657,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() { var str = this.str; var c = str.getByte(); - while (Lexer.isSpace(c)) { + while (isSpace(c)) { c = str.getByte(); } @@ -22680,7 +22681,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() { input[0] = c; for (i = 1; i < 5; ++i) { c = str.getByte(); - while (Lexer.isSpace(c)) { + while (isSpace(c)) { c = str.getByte(); } @@ -22827,6 +22828,7 @@ var RunLengthStream = (function RunLengthStreamClosure() { var CCITTFaxStream = (function CCITTFaxStreamClosure() { var ccittEOL = -2; + var ccittEOF = -1; var twoDimPass = 0; var twoDimHoriz = 1; var twoDimVert0 = 2; @@ -23509,7 +23511,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { } } break; - case EOF: + case ccittEOF: this.addPixels(columns, 0); this.eof = true; break; @@ -23550,7 +23552,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { } else { code1 = this.lookBits(12); if (this.eoline) { - while (code1 !== EOF && code1 !== 1) { + while (code1 !== ccittEOF && code1 !== 1) { this.eatBits(1); code1 = this.lookBits(12); } @@ -23563,7 +23565,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { if (code1 === 1) { this.eatBits(12); gotEOL = true; - } else if (code1 === EOF) { + } else if (code1 === ccittEOF) { this.eof = true; } } @@ -23599,7 +23601,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { } else if (this.err && this.eoline) { while (true) { code1 = this.lookBits(13); - if (code1 === EOF) { + if (code1 === ccittEOF) { this.eof = true; return null; } @@ -23679,7 +23681,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { var limitValue = limit || 0; for (var i = start; i <= end; ++i) { var code = this.lookBits(i); - if (code === EOF) { + if (code === ccittEOF) { return [true, 1, false]; } if (i < end) { @@ -23715,7 +23717,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { } } info('Bad two dim code'); - return EOF; + return ccittEOF; }; CCITTFaxStream.prototype.getWhiteCode = @@ -23725,7 +23727,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { var p; if (this.eoblock) { code = this.lookBits(12); - if (code === EOF) { + if (code === ccittEOF) { return 1; } @@ -23761,7 +23763,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { var code, p; if (this.eoblock) { code = this.lookBits(13); - if (code === EOF) { + if (code === ccittEOF) { return 1; } if ((code >> 7) === 0) { @@ -23802,12 +23804,12 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { while (this.inputBits < n) { if ((c = this.str.getByte()) === -1) { if (this.inputBits === 0) { - return EOF; + return ccittEOF; } return ((this.inputBuf << (n - this.inputBits)) & (0xFFFF >> (16 - n))); } - this.inputBuf = (this.inputBuf << 8) + c; + this.inputBuf = (this.inputBuf << 8) | c; this.inputBits += 8; } return (this.inputBuf >> (this.inputBits - n)) & (0xFFFF >> (16 - n)); @@ -23963,14 +23965,6 @@ var NullStream = (function NullStreamClosure() { return NullStream; })(); -// TODO refactor to remove dependency on parser.js -function _setCoreParser(coreParser_) { - coreParser = coreParser_; - EOF = coreParser_.EOF; - Lexer = coreParser_.Lexer; -} -exports._setCoreParser = _setCoreParser; - // TODO refactor to remove dependency on colorspace.js function _setCoreColorSpace(coreColorSpace_) { coreColorSpace = coreColorSpace_; @@ -28319,9 +28313,6 @@ exports.Lexer = Lexer; exports.Linearization = Linearization; exports.Parser = Parser; exports.isEOF = isEOF; - -// TODO refactor to remove dependency on stream.js -coreStream._setCoreParser(exports); })); diff --git a/build/pdf.js b/build/pdf.js index ffe703d25..ddaec0f7f 100644 --- a/build/pdf.js +++ b/build/pdf.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.4.145'; -var pdfjsBuild = '4a44a2c'; +var pdfjsVersion = '1.4.147'; +var pdfjsBuild = '54ee15d'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? diff --git a/build/pdf.worker.js b/build/pdf.worker.js index 26688209e..44f5a091d 100644 --- a/build/pdf.worker.js +++ b/build/pdf.worker.js @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {})); // Use strict in our context only - users might not want it 'use strict'; -var pdfjsVersion = '1.4.145'; -var pdfjsBuild = '4a44a2c'; +var pdfjsVersion = '1.4.147'; +var pdfjsBuild = '54ee15d'; var pdfjsFilePath = typeof document !== 'undefined' && document.currentScript ? @@ -18206,10 +18206,6 @@ var Jbig2Image = coreJbig2.Jbig2Image; var JpegImage = coreJpg.JpegImage; var JpxImage = coreJpx.JpxImage; -var coreParser; // see _setCoreParser below -var EOF; // = coreParser.EOF; -var Lexer; // = coreParser.Lexer; - var coreColorSpace; // see _setCoreColorSpace below var ColorSpace; // = coreColorSpace.ColorSpace; @@ -19331,6 +19327,11 @@ var DecryptStream = (function DecryptStreamClosure() { })(); var Ascii85Stream = (function Ascii85StreamClosure() { + // Checks if ch is one of the following characters: SPACE, TAB, CR or LF. + function isSpace(ch) { + return (ch === 0x20 || ch === 0x09 || ch === 0x0D || ch === 0x0A); + } + function Ascii85Stream(str, maybeLength) { this.str = str; this.dict = str.dict; @@ -19354,7 +19355,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() { var str = this.str; var c = str.getByte(); - while (Lexer.isSpace(c)) { + while (isSpace(c)) { c = str.getByte(); } @@ -19378,7 +19379,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() { input[0] = c; for (i = 1; i < 5; ++i) { c = str.getByte(); - while (Lexer.isSpace(c)) { + while (isSpace(c)) { c = str.getByte(); } @@ -19525,6 +19526,7 @@ var RunLengthStream = (function RunLengthStreamClosure() { var CCITTFaxStream = (function CCITTFaxStreamClosure() { var ccittEOL = -2; + var ccittEOF = -1; var twoDimPass = 0; var twoDimHoriz = 1; var twoDimVert0 = 2; @@ -20207,7 +20209,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { } } break; - case EOF: + case ccittEOF: this.addPixels(columns, 0); this.eof = true; break; @@ -20248,7 +20250,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { } else { code1 = this.lookBits(12); if (this.eoline) { - while (code1 !== EOF && code1 !== 1) { + while (code1 !== ccittEOF && code1 !== 1) { this.eatBits(1); code1 = this.lookBits(12); } @@ -20261,7 +20263,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { if (code1 === 1) { this.eatBits(12); gotEOL = true; - } else if (code1 === EOF) { + } else if (code1 === ccittEOF) { this.eof = true; } } @@ -20297,7 +20299,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { } else if (this.err && this.eoline) { while (true) { code1 = this.lookBits(13); - if (code1 === EOF) { + if (code1 === ccittEOF) { this.eof = true; return null; } @@ -20377,7 +20379,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { var limitValue = limit || 0; for (var i = start; i <= end; ++i) { var code = this.lookBits(i); - if (code === EOF) { + if (code === ccittEOF) { return [true, 1, false]; } if (i < end) { @@ -20413,7 +20415,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { } } info('Bad two dim code'); - return EOF; + return ccittEOF; }; CCITTFaxStream.prototype.getWhiteCode = @@ -20423,7 +20425,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { var p; if (this.eoblock) { code = this.lookBits(12); - if (code === EOF) { + if (code === ccittEOF) { return 1; } @@ -20459,7 +20461,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { var code, p; if (this.eoblock) { code = this.lookBits(13); - if (code === EOF) { + if (code === ccittEOF) { return 1; } if ((code >> 7) === 0) { @@ -20500,12 +20502,12 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() { while (this.inputBits < n) { if ((c = this.str.getByte()) === -1) { if (this.inputBits === 0) { - return EOF; + return ccittEOF; } return ((this.inputBuf << (n - this.inputBits)) & (0xFFFF >> (16 - n))); } - this.inputBuf = (this.inputBuf << 8) + c; + this.inputBuf = (this.inputBuf << 8) | c; this.inputBits += 8; } return (this.inputBuf >> (this.inputBits - n)) & (0xFFFF >> (16 - n)); @@ -20661,14 +20663,6 @@ var NullStream = (function NullStreamClosure() { return NullStream; })(); -// TODO refactor to remove dependency on parser.js -function _setCoreParser(coreParser_) { - coreParser = coreParser_; - EOF = coreParser_.EOF; - Lexer = coreParser_.Lexer; -} -exports._setCoreParser = _setCoreParser; - // TODO refactor to remove dependency on colorspace.js function _setCoreColorSpace(coreColorSpace_) { coreColorSpace = coreColorSpace_; @@ -24594,9 +24588,6 @@ exports.Lexer = Lexer; exports.Linearization = Linearization; exports.Parser = Parser; exports.isEOF = isEOF; - -// TODO refactor to remove dependency on stream.js -coreStream._setCoreParser(exports); })); diff --git a/package.json b/package.json index 058703334..c3f3b9c71 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "pdfjs-dist", - "version": "1.4.145", + "version": "1.4.147", "main": "build/pdf.js", "description": "Generic build of Mozilla's PDF.js library.", "keywords": [