Browse Source

PDF.js version 1.4.147 - See mozilla/pdf.js@54ee15d866812d8c9db9d5e23be654534b616fc6

master v1.4.147
Pdf Bot 9 years ago
parent
commit
1658918b9b
  1. 2
      bower.json
  2. 49
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 49
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.4.145", "version": "1.4.147",
"main": [ "main": [
"build/pdf.js", "build/pdf.js",
"build/pdf.worker.js" "build/pdf.worker.js"

49
build/pdf.combined.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {}));
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.4.145'; var pdfjsVersion = '1.4.147';
var pdfjsBuild = '4a44a2c'; var pdfjsBuild = '54ee15d';
var pdfjsFilePath = var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ? typeof document !== 'undefined' && document.currentScript ?
@ -21508,10 +21508,6 @@ var Jbig2Image = coreJbig2.Jbig2Image;
var JpegImage = coreJpg.JpegImage; var JpegImage = coreJpg.JpegImage;
var JpxImage = coreJpx.JpxImage; var JpxImage = coreJpx.JpxImage;
var coreParser; // see _setCoreParser below
var EOF; // = coreParser.EOF;
var Lexer; // = coreParser.Lexer;
var coreColorSpace; // see _setCoreColorSpace below var coreColorSpace; // see _setCoreColorSpace below
var ColorSpace; // = coreColorSpace.ColorSpace; var ColorSpace; // = coreColorSpace.ColorSpace;
@ -22633,6 +22629,11 @@ var DecryptStream = (function DecryptStreamClosure() {
})(); })();
var Ascii85Stream = (function Ascii85StreamClosure() { 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) { function Ascii85Stream(str, maybeLength) {
this.str = str; this.str = str;
this.dict = str.dict; this.dict = str.dict;
@ -22656,7 +22657,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
var str = this.str; var str = this.str;
var c = str.getByte(); var c = str.getByte();
while (Lexer.isSpace(c)) { while (isSpace(c)) {
c = str.getByte(); c = str.getByte();
} }
@ -22680,7 +22681,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
input[0] = c; input[0] = c;
for (i = 1; i < 5; ++i) { for (i = 1; i < 5; ++i) {
c = str.getByte(); c = str.getByte();
while (Lexer.isSpace(c)) { while (isSpace(c)) {
c = str.getByte(); c = str.getByte();
} }
@ -22827,6 +22828,7 @@ var RunLengthStream = (function RunLengthStreamClosure() {
var CCITTFaxStream = (function CCITTFaxStreamClosure() { var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var ccittEOL = -2; var ccittEOL = -2;
var ccittEOF = -1;
var twoDimPass = 0; var twoDimPass = 0;
var twoDimHoriz = 1; var twoDimHoriz = 1;
var twoDimVert0 = 2; var twoDimVert0 = 2;
@ -23509,7 +23511,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
} }
} }
break; break;
case EOF: case ccittEOF:
this.addPixels(columns, 0); this.addPixels(columns, 0);
this.eof = true; this.eof = true;
break; break;
@ -23550,7 +23552,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
} else { } else {
code1 = this.lookBits(12); code1 = this.lookBits(12);
if (this.eoline) { if (this.eoline) {
while (code1 !== EOF && code1 !== 1) { while (code1 !== ccittEOF && code1 !== 1) {
this.eatBits(1); this.eatBits(1);
code1 = this.lookBits(12); code1 = this.lookBits(12);
} }
@ -23563,7 +23565,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
if (code1 === 1) { if (code1 === 1) {
this.eatBits(12); this.eatBits(12);
gotEOL = true; gotEOL = true;
} else if (code1 === EOF) { } else if (code1 === ccittEOF) {
this.eof = true; this.eof = true;
} }
} }
@ -23599,7 +23601,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
} else if (this.err && this.eoline) { } else if (this.err && this.eoline) {
while (true) { while (true) {
code1 = this.lookBits(13); code1 = this.lookBits(13);
if (code1 === EOF) { if (code1 === ccittEOF) {
this.eof = true; this.eof = true;
return null; return null;
} }
@ -23679,7 +23681,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var limitValue = limit || 0; var limitValue = limit || 0;
for (var i = start; i <= end; ++i) { for (var i = start; i <= end; ++i) {
var code = this.lookBits(i); var code = this.lookBits(i);
if (code === EOF) { if (code === ccittEOF) {
return [true, 1, false]; return [true, 1, false];
} }
if (i < end) { if (i < end) {
@ -23715,7 +23717,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
} }
} }
info('Bad two dim code'); info('Bad two dim code');
return EOF; return ccittEOF;
}; };
CCITTFaxStream.prototype.getWhiteCode = CCITTFaxStream.prototype.getWhiteCode =
@ -23725,7 +23727,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var p; var p;
if (this.eoblock) { if (this.eoblock) {
code = this.lookBits(12); code = this.lookBits(12);
if (code === EOF) { if (code === ccittEOF) {
return 1; return 1;
} }
@ -23761,7 +23763,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var code, p; var code, p;
if (this.eoblock) { if (this.eoblock) {
code = this.lookBits(13); code = this.lookBits(13);
if (code === EOF) { if (code === ccittEOF) {
return 1; return 1;
} }
if ((code >> 7) === 0) { if ((code >> 7) === 0) {
@ -23802,12 +23804,12 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
while (this.inputBits < n) { while (this.inputBits < n) {
if ((c = this.str.getByte()) === -1) { if ((c = this.str.getByte()) === -1) {
if (this.inputBits === 0) { if (this.inputBits === 0) {
return EOF; return ccittEOF;
} }
return ((this.inputBuf << (n - this.inputBits)) & return ((this.inputBuf << (n - this.inputBits)) &
(0xFFFF >> (16 - n))); (0xFFFF >> (16 - n)));
} }
this.inputBuf = (this.inputBuf << 8) + c; this.inputBuf = (this.inputBuf << 8) | c;
this.inputBits += 8; this.inputBits += 8;
} }
return (this.inputBuf >> (this.inputBits - n)) & (0xFFFF >> (16 - n)); return (this.inputBuf >> (this.inputBits - n)) & (0xFFFF >> (16 - n));
@ -23963,14 +23965,6 @@ var NullStream = (function NullStreamClosure() {
return NullStream; 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 // TODO refactor to remove dependency on colorspace.js
function _setCoreColorSpace(coreColorSpace_) { function _setCoreColorSpace(coreColorSpace_) {
coreColorSpace = coreColorSpace_; coreColorSpace = coreColorSpace_;
@ -28319,9 +28313,6 @@ exports.Lexer = Lexer;
exports.Linearization = Linearization; exports.Linearization = Linearization;
exports.Parser = Parser; exports.Parser = Parser;
exports.isEOF = isEOF; exports.isEOF = isEOF;
// TODO refactor to remove dependency on stream.js
coreStream._setCoreParser(exports);
})); }));

4
build/pdf.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.4.145'; var pdfjsVersion = '1.4.147';
var pdfjsBuild = '4a44a2c'; var pdfjsBuild = '54ee15d';
var pdfjsFilePath = var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ? typeof document !== 'undefined' && document.currentScript ?

49
build/pdf.worker.js vendored

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
'use strict'; 'use strict';
var pdfjsVersion = '1.4.145'; var pdfjsVersion = '1.4.147';
var pdfjsBuild = '4a44a2c'; var pdfjsBuild = '54ee15d';
var pdfjsFilePath = var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ? typeof document !== 'undefined' && document.currentScript ?
@ -18206,10 +18206,6 @@ var Jbig2Image = coreJbig2.Jbig2Image;
var JpegImage = coreJpg.JpegImage; var JpegImage = coreJpg.JpegImage;
var JpxImage = coreJpx.JpxImage; var JpxImage = coreJpx.JpxImage;
var coreParser; // see _setCoreParser below
var EOF; // = coreParser.EOF;
var Lexer; // = coreParser.Lexer;
var coreColorSpace; // see _setCoreColorSpace below var coreColorSpace; // see _setCoreColorSpace below
var ColorSpace; // = coreColorSpace.ColorSpace; var ColorSpace; // = coreColorSpace.ColorSpace;
@ -19331,6 +19327,11 @@ var DecryptStream = (function DecryptStreamClosure() {
})(); })();
var Ascii85Stream = (function Ascii85StreamClosure() { 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) { function Ascii85Stream(str, maybeLength) {
this.str = str; this.str = str;
this.dict = str.dict; this.dict = str.dict;
@ -19354,7 +19355,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
var str = this.str; var str = this.str;
var c = str.getByte(); var c = str.getByte();
while (Lexer.isSpace(c)) { while (isSpace(c)) {
c = str.getByte(); c = str.getByte();
} }
@ -19378,7 +19379,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
input[0] = c; input[0] = c;
for (i = 1; i < 5; ++i) { for (i = 1; i < 5; ++i) {
c = str.getByte(); c = str.getByte();
while (Lexer.isSpace(c)) { while (isSpace(c)) {
c = str.getByte(); c = str.getByte();
} }
@ -19525,6 +19526,7 @@ var RunLengthStream = (function RunLengthStreamClosure() {
var CCITTFaxStream = (function CCITTFaxStreamClosure() { var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var ccittEOL = -2; var ccittEOL = -2;
var ccittEOF = -1;
var twoDimPass = 0; var twoDimPass = 0;
var twoDimHoriz = 1; var twoDimHoriz = 1;
var twoDimVert0 = 2; var twoDimVert0 = 2;
@ -20207,7 +20209,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
} }
} }
break; break;
case EOF: case ccittEOF:
this.addPixels(columns, 0); this.addPixels(columns, 0);
this.eof = true; this.eof = true;
break; break;
@ -20248,7 +20250,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
} else { } else {
code1 = this.lookBits(12); code1 = this.lookBits(12);
if (this.eoline) { if (this.eoline) {
while (code1 !== EOF && code1 !== 1) { while (code1 !== ccittEOF && code1 !== 1) {
this.eatBits(1); this.eatBits(1);
code1 = this.lookBits(12); code1 = this.lookBits(12);
} }
@ -20261,7 +20263,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
if (code1 === 1) { if (code1 === 1) {
this.eatBits(12); this.eatBits(12);
gotEOL = true; gotEOL = true;
} else if (code1 === EOF) { } else if (code1 === ccittEOF) {
this.eof = true; this.eof = true;
} }
} }
@ -20297,7 +20299,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
} else if (this.err && this.eoline) { } else if (this.err && this.eoline) {
while (true) { while (true) {
code1 = this.lookBits(13); code1 = this.lookBits(13);
if (code1 === EOF) { if (code1 === ccittEOF) {
this.eof = true; this.eof = true;
return null; return null;
} }
@ -20377,7 +20379,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var limitValue = limit || 0; var limitValue = limit || 0;
for (var i = start; i <= end; ++i) { for (var i = start; i <= end; ++i) {
var code = this.lookBits(i); var code = this.lookBits(i);
if (code === EOF) { if (code === ccittEOF) {
return [true, 1, false]; return [true, 1, false];
} }
if (i < end) { if (i < end) {
@ -20413,7 +20415,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
} }
} }
info('Bad two dim code'); info('Bad two dim code');
return EOF; return ccittEOF;
}; };
CCITTFaxStream.prototype.getWhiteCode = CCITTFaxStream.prototype.getWhiteCode =
@ -20423,7 +20425,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var p; var p;
if (this.eoblock) { if (this.eoblock) {
code = this.lookBits(12); code = this.lookBits(12);
if (code === EOF) { if (code === ccittEOF) {
return 1; return 1;
} }
@ -20459,7 +20461,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var code, p; var code, p;
if (this.eoblock) { if (this.eoblock) {
code = this.lookBits(13); code = this.lookBits(13);
if (code === EOF) { if (code === ccittEOF) {
return 1; return 1;
} }
if ((code >> 7) === 0) { if ((code >> 7) === 0) {
@ -20500,12 +20502,12 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
while (this.inputBits < n) { while (this.inputBits < n) {
if ((c = this.str.getByte()) === -1) { if ((c = this.str.getByte()) === -1) {
if (this.inputBits === 0) { if (this.inputBits === 0) {
return EOF; return ccittEOF;
} }
return ((this.inputBuf << (n - this.inputBits)) & return ((this.inputBuf << (n - this.inputBits)) &
(0xFFFF >> (16 - n))); (0xFFFF >> (16 - n)));
} }
this.inputBuf = (this.inputBuf << 8) + c; this.inputBuf = (this.inputBuf << 8) | c;
this.inputBits += 8; this.inputBits += 8;
} }
return (this.inputBuf >> (this.inputBits - n)) & (0xFFFF >> (16 - n)); return (this.inputBuf >> (this.inputBits - n)) & (0xFFFF >> (16 - n));
@ -20661,14 +20663,6 @@ var NullStream = (function NullStreamClosure() {
return NullStream; 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 // TODO refactor to remove dependency on colorspace.js
function _setCoreColorSpace(coreColorSpace_) { function _setCoreColorSpace(coreColorSpace_) {
coreColorSpace = coreColorSpace_; coreColorSpace = coreColorSpace_;
@ -24594,9 +24588,6 @@ exports.Lexer = Lexer;
exports.Linearization = Linearization; exports.Linearization = Linearization;
exports.Parser = Parser; exports.Parser = Parser;
exports.isEOF = isEOF; exports.isEOF = isEOF;
// TODO refactor to remove dependency on stream.js
coreStream._setCoreParser(exports);
})); }));

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.4.145", "version": "1.4.147",
"main": "build/pdf.js", "main": "build/pdf.js",
"description": "Generic build of Mozilla's PDF.js library.", "description": "Generic build of Mozilla's PDF.js library.",
"keywords": [ "keywords": [

Loading…
Cancel
Save