Browse Source

PDF.js version 1.0.569

master v1.0.569
Yury Delendik 10 years ago
parent
commit
a54dbab5af
  1. 2
      bower.json
  2. 80
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 80
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.566", "version": "1.0.569",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",
"pdf", "pdf",

80
build/pdf.combined.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.566'; PDFJS.version = '1.0.569';
PDFJS.build = 'cb59b57'; PDFJS.build = '10daf04';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -33547,7 +33547,7 @@ var Parser = (function ParserClosure() {
// searching for the /EI\s/ // searching for the /EI\s/
var state = 0, ch, i, ii; var state = 0, ch, i, ii;
while (state != 4 && (ch = stream.getByte()) !== -1) { while (state !== 4 && (ch = stream.getByte()) !== -1) {
switch (ch | 0) { switch (ch | 0) {
case 0x20: case 0x20:
case 0x0D: case 0x0D:
@ -33741,7 +33741,7 @@ var Parser = (function ParserClosure() {
} }
try { try {
var xrefStreamStats = this.xref.stats.streamTypes; var xrefStreamStats = this.xref.stats.streamTypes;
if (name == 'FlateDecode' || name == 'Fl') { if (name === 'FlateDecode' || name === 'Fl') {
xrefStreamStats[StreamType.FLATE] = true; xrefStreamStats[StreamType.FLATE] = true;
if (params) { if (params) {
return new PredictorStream(new FlateStream(stream, maybeLength), return new PredictorStream(new FlateStream(stream, maybeLength),
@ -33749,7 +33749,7 @@ var Parser = (function ParserClosure() {
} }
return new FlateStream(stream, maybeLength); return new FlateStream(stream, maybeLength);
} }
if (name == 'LZWDecode' || name == 'LZW') { if (name === 'LZWDecode' || name === 'LZW') {
xrefStreamStats[StreamType.LZW] = true; xrefStreamStats[StreamType.LZW] = true;
var earlyChange = 1; var earlyChange = 1;
if (params) { if (params) {
@ -33762,31 +33762,31 @@ var Parser = (function ParserClosure() {
} }
return new LZWStream(stream, maybeLength, earlyChange); return new LZWStream(stream, maybeLength, earlyChange);
} }
if (name == 'DCTDecode' || name == 'DCT') { if (name === 'DCTDecode' || name === 'DCT') {
xrefStreamStats[StreamType.DCT] = true; xrefStreamStats[StreamType.DCT] = true;
return new JpegStream(stream, maybeLength, stream.dict, this.xref); return new JpegStream(stream, maybeLength, stream.dict, this.xref);
} }
if (name == 'JPXDecode' || name == 'JPX') { if (name === 'JPXDecode' || name === 'JPX') {
xrefStreamStats[StreamType.JPX] = true; xrefStreamStats[StreamType.JPX] = true;
return new JpxStream(stream, maybeLength, stream.dict); return new JpxStream(stream, maybeLength, stream.dict);
} }
if (name == 'ASCII85Decode' || name == 'A85') { if (name === 'ASCII85Decode' || name === 'A85') {
xrefStreamStats[StreamType.A85] = true; xrefStreamStats[StreamType.A85] = true;
return new Ascii85Stream(stream, maybeLength); return new Ascii85Stream(stream, maybeLength);
} }
if (name == 'ASCIIHexDecode' || name == 'AHx') { if (name === 'ASCIIHexDecode' || name === 'AHx') {
xrefStreamStats[StreamType.AHX] = true; xrefStreamStats[StreamType.AHX] = true;
return new AsciiHexStream(stream, maybeLength); return new AsciiHexStream(stream, maybeLength);
} }
if (name == 'CCITTFaxDecode' || name == 'CCF') { if (name === 'CCITTFaxDecode' || name === 'CCF') {
xrefStreamStats[StreamType.CCF] = true; xrefStreamStats[StreamType.CCF] = true;
return new CCITTFaxStream(stream, maybeLength, params); return new CCITTFaxStream(stream, maybeLength, params);
} }
if (name == 'RunLengthDecode' || name == 'RL') { if (name === 'RunLengthDecode' || name === 'RL') {
xrefStreamStats[StreamType.RL] = true; xrefStreamStats[StreamType.RL] = true;
return new RunLengthStream(stream, maybeLength); return new RunLengthStream(stream, maybeLength);
} }
if (name == 'JBIG2Decode') { if (name === 'JBIG2Decode') {
xrefStreamStats[StreamType.JBIG] = true; xrefStreamStats[StreamType.JBIG] = true;
return new Jbig2Stream(stream, maybeLength, stream.dict); return new Jbig2Stream(stream, maybeLength, stream.dict);
} }
@ -34045,7 +34045,7 @@ var Lexer = (function LexerClosure() {
if (ch === 0x23) { // '#' if (ch === 0x23) { // '#'
ch = this.nextChar(); ch = this.nextChar();
var x = toHexDigit(ch); var x = toHexDigit(ch);
if (x != -1) { if (x !== -1) {
var x2 = toHexDigit(this.nextChar()); var x2 = toHexDigit(this.nextChar());
if (x2 === -1) { if (x2 === -1) {
error('Illegal digit in hex char in name: ' + x2); error('Illegal digit in hex char in name: ' + x2);
@ -34827,10 +34827,10 @@ var FlateStream = (function FlateStreamClosure() {
var cmf = str.getByte(); var cmf = str.getByte();
var flg = str.getByte(); var flg = str.getByte();
if (cmf == -1 || flg == -1) { if (cmf === -1 || flg === -1) {
error('Invalid header in flate stream: ' + cmf + ', ' + flg); error('Invalid header in flate stream: ' + cmf + ', ' + flg);
} }
if ((cmf & 0x0f) != 0x08) { if ((cmf & 0x0f) !== 0x08) {
error('Unknown compression method in flate stream: ' + cmf + ', ' + flg); error('Unknown compression method in flate stream: ' + cmf + ', ' + flg);
} }
if ((((cmf << 8) + flg) % 31) !== 0) { if ((((cmf << 8) + flg) % 31) !== 0) {
@ -34916,7 +34916,7 @@ var FlateStream = (function FlateStreamClosure() {
len <= maxLen; len <= maxLen;
++len, code <<= 1, skip <<= 1) { ++len, code <<= 1, skip <<= 1) {
for (var val = 0; val < n; ++val) { for (var val = 0; val < n; ++val) {
if (lengths[val] == len) { if (lengths[val] === len) {
// bit-reverse the code // bit-reverse the code
var code2 = 0; var code2 = 0;
var t = code; var t = code;
@ -34966,7 +34966,7 @@ var FlateStream = (function FlateStreamClosure() {
error('Bad block header in flate stream'); error('Bad block header in flate stream');
} }
check |= (b << 8); check |= (b << 8);
if (check != (~blockLen & 0xffff) && if (check !== (~blockLen & 0xffff) &&
(blockLen !== 0 || check !== 0)) { (blockLen !== 0 || check !== 0)) {
// Ignoring error for bad "empty" block (see issue 1277) // Ignoring error for bad "empty" block (see issue 1277)
error('Bad uncompressed block length in flate stream'); error('Bad uncompressed block length in flate stream');
@ -34997,10 +34997,10 @@ var FlateStream = (function FlateStreamClosure() {
var litCodeTable; var litCodeTable;
var distCodeTable; var distCodeTable;
if (hdr == 1) { // compressed block, fixed codes if (hdr === 1) { // compressed block, fixed codes
litCodeTable = fixedLitCodeTab; litCodeTable = fixedLitCodeTab;
distCodeTable = fixedDistCodeTab; distCodeTable = fixedDistCodeTab;
} else if (hdr == 2) { // compressed block, dynamic codes } else if (hdr === 2) { // compressed block, dynamic codes
var numLitCodes = this.getBits(5) + 257; var numLitCodes = this.getBits(5) + 257;
var numDistCodes = this.getBits(5) + 1; var numDistCodes = this.getBits(5) + 1;
var numCodeLenCodes = this.getBits(4) + 4; var numCodeLenCodes = this.getBits(4) + 4;
@ -35022,11 +35022,11 @@ var FlateStream = (function FlateStreamClosure() {
var bitsLength, bitsOffset, what; var bitsLength, bitsOffset, what;
while (i < codes) { while (i < codes) {
var code = this.getCode(codeLenCodeTab); var code = this.getCode(codeLenCodeTab);
if (code == 16) { if (code === 16) {
bitsLength = 2; bitsOffset = 3; what = len; bitsLength = 2; bitsOffset = 3; what = len;
} else if (code == 17) { } else if (code === 17) {
bitsLength = 3; bitsOffset = 3; what = (len = 0); bitsLength = 3; bitsOffset = 3; what = (len = 0);
} else if (code == 18) { } else if (code === 18) {
bitsLength = 7; bitsOffset = 11; what = (len = 0); bitsLength = 7; bitsOffset = 11; what = (len = 0);
} else { } else {
codeLengths[i++] = len = code; codeLengths[i++] = len = code;
@ -35060,7 +35060,7 @@ var FlateStream = (function FlateStreamClosure() {
buffer[pos++] = code1; buffer[pos++] = code1;
continue; continue;
} }
if (code1 == 256) { if (code1 === 256) {
this.bufferLength = pos; this.bufferLength = pos;
return; return;
} }
@ -35381,7 +35381,7 @@ var JpegStream = (function JpegStreamClosure() {
function JpegStream_isNativelyDecodable(xref, res) { function JpegStream_isNativelyDecodable(xref, res) {
var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res); var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res);
var numComps = cs.numComps; var numComps = cs.numComps;
return numComps == 1 || numComps == 3; return numComps === 1 || numComps === 3;
}; };
return JpegStream; return JpegStream;
@ -35601,7 +35601,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
var i; var i;
// special code for z // special code for z
if (c == Z_LOWER_CHAR) { if (c === Z_LOWER_CHAR) {
buffer = this.ensureBuffer(bufferLength + 4); buffer = this.ensureBuffer(bufferLength + 4);
for (i = 0; i < 4; ++i) { for (i = 0; i < 4; ++i) {
buffer[bufferLength + i] = 0; buffer[bufferLength + i] = 0;
@ -35618,7 +35618,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
input[i] = c; input[i] = c;
if (c === EOF || c == TILDA_CHAR) { if (c === EOF || c === TILDA_CHAR) {
break; break;
} }
} }
@ -35725,7 +35725,7 @@ var RunLengthStream = (function RunLengthStreamClosure() {
// (in addition to the second byte from the header), n = 129 through 255 - // (in addition to the second byte from the header), n = 129 through 255 -
// duplicate the second byte from the header (257 - n) times, n = 128 - end. // duplicate the second byte from the header (257 - n) times, n = 128 - end.
var repeatHeader = this.str.getBytes(2); var repeatHeader = this.str.getBytes(2);
if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] == 128) { if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] === 128) {
this.eof = true; this.eof = true;
return; return;
} }
@ -36218,7 +36218,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
while ((code1 = this.lookBits(12)) === 0) { while ((code1 = this.lookBits(12)) === 0) {
this.eatBits(1); this.eatBits(1);
} }
if (code1 == 1) { if (code1 === 1) {
this.eatBits(12); this.eatBits(12);
} }
if (this.encoding > 0) { if (this.encoding > 0) {
@ -36477,7 +36477,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var gotEOL = false; var gotEOL = false;
if (!this.eoblock && this.row == this.rows - 1) { if (!this.eoblock && this.row === this.rows - 1) {
this.eof = true; this.eof = true;
} else { } else {
code1 = this.lookBits(12); code1 = this.lookBits(12);
@ -36485,10 +36485,10 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
this.eatBits(1); this.eatBits(1);
code1 = this.lookBits(12); code1 = this.lookBits(12);
} }
if (code1 == 1) { if (code1 === 1) {
this.eatBits(12); this.eatBits(12);
gotEOL = true; gotEOL = true;
} else if (code1 == EOF) { } else if (code1 === EOF) {
this.eof = true; this.eof = true;
} }
} }
@ -36500,7 +36500,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
if (this.eoblock && gotEOL) { if (this.eoblock && gotEOL) {
code1 = this.lookBits(12); code1 = this.lookBits(12);
if (code1 == 1) { if (code1 === 1) {
this.eatBits(12); this.eatBits(12);
if (this.encoding > 0) { if (this.encoding > 0) {
this.lookBits(1); this.lookBits(1);
@ -36509,7 +36509,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
if (this.encoding >= 0) { if (this.encoding >= 0) {
for (i = 0; i < 4; ++i) { for (i = 0; i < 4; ++i) {
code1 = this.lookBits(12); code1 = this.lookBits(12);
if (code1 != 1) { if (code1 !== 1) {
info('bad rtc code: ' + code1); info('bad rtc code: ' + code1);
} }
this.eatBits(12); this.eatBits(12);
@ -36524,11 +36524,11 @@ 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 === EOF) {
this.eof = true; this.eof = true;
return null; return null;
} }
if ((code1 >> 1) == 1) { if ((code1 >> 1) === 1) {
break; break;
} }
this.eatBits(1); this.eatBits(1);
@ -36604,7 +36604,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 === EOF) {
return [true, 1, false]; return [true, 1, false];
} }
if (i < end) { if (i < end) {
@ -36612,7 +36612,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
} }
if (!limitValue || code >= limitValue) { if (!limitValue || code >= limitValue) {
var p = table[code - limitValue]; var p = table[code - limitValue];
if (p[0] == i) { if (p[0] === i) {
this.eatBits(i); this.eatBits(i);
return [true, p[1], true]; return [true, p[1], true];
} }
@ -36650,7 +36650,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 === EOF) {
return 1; return 1;
} }
@ -36686,7 +36686,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 === EOF) {
return 1; return 1;
} }
if ((code >> 7) === 0) { if ((code >> 7) === 0) {
@ -36834,7 +36834,7 @@ var LZWStream = (function LZWStreamClosure() {
} else { } else {
currentSequence[currentSequenceLength++] = currentSequence[0]; currentSequence[currentSequenceLength++] = currentSequence[0];
} }
} else if (code == 256) { } else if (code === 256) {
codeLength = 9; codeLength = 9;
nextCode = 258; nextCode = 258;
currentSequenceLength = 0; currentSequenceLength = 0;

4
build/pdf.js

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.566'; PDFJS.version = '1.0.569';
PDFJS.build = 'cb59b57'; PDFJS.build = '10daf04';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it

80
build/pdf.worker.js vendored

@ -22,8 +22,8 @@ if (typeof PDFJS === 'undefined') {
(typeof window !== 'undefined' ? window : this).PDFJS = {}; (typeof window !== 'undefined' ? window : this).PDFJS = {};
} }
PDFJS.version = '1.0.566'; PDFJS.version = '1.0.569';
PDFJS.build = 'cb59b57'; PDFJS.build = '10daf04';
(function pdfjsWrapper() { (function pdfjsWrapper() {
// Use strict in our context only - users might not want it // Use strict in our context only - users might not want it
@ -28690,7 +28690,7 @@ var Parser = (function ParserClosure() {
// searching for the /EI\s/ // searching for the /EI\s/
var state = 0, ch, i, ii; var state = 0, ch, i, ii;
while (state != 4 && (ch = stream.getByte()) !== -1) { while (state !== 4 && (ch = stream.getByte()) !== -1) {
switch (ch | 0) { switch (ch | 0) {
case 0x20: case 0x20:
case 0x0D: case 0x0D:
@ -28884,7 +28884,7 @@ var Parser = (function ParserClosure() {
} }
try { try {
var xrefStreamStats = this.xref.stats.streamTypes; var xrefStreamStats = this.xref.stats.streamTypes;
if (name == 'FlateDecode' || name == 'Fl') { if (name === 'FlateDecode' || name === 'Fl') {
xrefStreamStats[StreamType.FLATE] = true; xrefStreamStats[StreamType.FLATE] = true;
if (params) { if (params) {
return new PredictorStream(new FlateStream(stream, maybeLength), return new PredictorStream(new FlateStream(stream, maybeLength),
@ -28892,7 +28892,7 @@ var Parser = (function ParserClosure() {
} }
return new FlateStream(stream, maybeLength); return new FlateStream(stream, maybeLength);
} }
if (name == 'LZWDecode' || name == 'LZW') { if (name === 'LZWDecode' || name === 'LZW') {
xrefStreamStats[StreamType.LZW] = true; xrefStreamStats[StreamType.LZW] = true;
var earlyChange = 1; var earlyChange = 1;
if (params) { if (params) {
@ -28905,31 +28905,31 @@ var Parser = (function ParserClosure() {
} }
return new LZWStream(stream, maybeLength, earlyChange); return new LZWStream(stream, maybeLength, earlyChange);
} }
if (name == 'DCTDecode' || name == 'DCT') { if (name === 'DCTDecode' || name === 'DCT') {
xrefStreamStats[StreamType.DCT] = true; xrefStreamStats[StreamType.DCT] = true;
return new JpegStream(stream, maybeLength, stream.dict, this.xref); return new JpegStream(stream, maybeLength, stream.dict, this.xref);
} }
if (name == 'JPXDecode' || name == 'JPX') { if (name === 'JPXDecode' || name === 'JPX') {
xrefStreamStats[StreamType.JPX] = true; xrefStreamStats[StreamType.JPX] = true;
return new JpxStream(stream, maybeLength, stream.dict); return new JpxStream(stream, maybeLength, stream.dict);
} }
if (name == 'ASCII85Decode' || name == 'A85') { if (name === 'ASCII85Decode' || name === 'A85') {
xrefStreamStats[StreamType.A85] = true; xrefStreamStats[StreamType.A85] = true;
return new Ascii85Stream(stream, maybeLength); return new Ascii85Stream(stream, maybeLength);
} }
if (name == 'ASCIIHexDecode' || name == 'AHx') { if (name === 'ASCIIHexDecode' || name === 'AHx') {
xrefStreamStats[StreamType.AHX] = true; xrefStreamStats[StreamType.AHX] = true;
return new AsciiHexStream(stream, maybeLength); return new AsciiHexStream(stream, maybeLength);
} }
if (name == 'CCITTFaxDecode' || name == 'CCF') { if (name === 'CCITTFaxDecode' || name === 'CCF') {
xrefStreamStats[StreamType.CCF] = true; xrefStreamStats[StreamType.CCF] = true;
return new CCITTFaxStream(stream, maybeLength, params); return new CCITTFaxStream(stream, maybeLength, params);
} }
if (name == 'RunLengthDecode' || name == 'RL') { if (name === 'RunLengthDecode' || name === 'RL') {
xrefStreamStats[StreamType.RL] = true; xrefStreamStats[StreamType.RL] = true;
return new RunLengthStream(stream, maybeLength); return new RunLengthStream(stream, maybeLength);
} }
if (name == 'JBIG2Decode') { if (name === 'JBIG2Decode') {
xrefStreamStats[StreamType.JBIG] = true; xrefStreamStats[StreamType.JBIG] = true;
return new Jbig2Stream(stream, maybeLength, stream.dict); return new Jbig2Stream(stream, maybeLength, stream.dict);
} }
@ -29188,7 +29188,7 @@ var Lexer = (function LexerClosure() {
if (ch === 0x23) { // '#' if (ch === 0x23) { // '#'
ch = this.nextChar(); ch = this.nextChar();
var x = toHexDigit(ch); var x = toHexDigit(ch);
if (x != -1) { if (x !== -1) {
var x2 = toHexDigit(this.nextChar()); var x2 = toHexDigit(this.nextChar());
if (x2 === -1) { if (x2 === -1) {
error('Illegal digit in hex char in name: ' + x2); error('Illegal digit in hex char in name: ' + x2);
@ -29970,10 +29970,10 @@ var FlateStream = (function FlateStreamClosure() {
var cmf = str.getByte(); var cmf = str.getByte();
var flg = str.getByte(); var flg = str.getByte();
if (cmf == -1 || flg == -1) { if (cmf === -1 || flg === -1) {
error('Invalid header in flate stream: ' + cmf + ', ' + flg); error('Invalid header in flate stream: ' + cmf + ', ' + flg);
} }
if ((cmf & 0x0f) != 0x08) { if ((cmf & 0x0f) !== 0x08) {
error('Unknown compression method in flate stream: ' + cmf + ', ' + flg); error('Unknown compression method in flate stream: ' + cmf + ', ' + flg);
} }
if ((((cmf << 8) + flg) % 31) !== 0) { if ((((cmf << 8) + flg) % 31) !== 0) {
@ -30059,7 +30059,7 @@ var FlateStream = (function FlateStreamClosure() {
len <= maxLen; len <= maxLen;
++len, code <<= 1, skip <<= 1) { ++len, code <<= 1, skip <<= 1) {
for (var val = 0; val < n; ++val) { for (var val = 0; val < n; ++val) {
if (lengths[val] == len) { if (lengths[val] === len) {
// bit-reverse the code // bit-reverse the code
var code2 = 0; var code2 = 0;
var t = code; var t = code;
@ -30109,7 +30109,7 @@ var FlateStream = (function FlateStreamClosure() {
error('Bad block header in flate stream'); error('Bad block header in flate stream');
} }
check |= (b << 8); check |= (b << 8);
if (check != (~blockLen & 0xffff) && if (check !== (~blockLen & 0xffff) &&
(blockLen !== 0 || check !== 0)) { (blockLen !== 0 || check !== 0)) {
// Ignoring error for bad "empty" block (see issue 1277) // Ignoring error for bad "empty" block (see issue 1277)
error('Bad uncompressed block length in flate stream'); error('Bad uncompressed block length in flate stream');
@ -30140,10 +30140,10 @@ var FlateStream = (function FlateStreamClosure() {
var litCodeTable; var litCodeTable;
var distCodeTable; var distCodeTable;
if (hdr == 1) { // compressed block, fixed codes if (hdr === 1) { // compressed block, fixed codes
litCodeTable = fixedLitCodeTab; litCodeTable = fixedLitCodeTab;
distCodeTable = fixedDistCodeTab; distCodeTable = fixedDistCodeTab;
} else if (hdr == 2) { // compressed block, dynamic codes } else if (hdr === 2) { // compressed block, dynamic codes
var numLitCodes = this.getBits(5) + 257; var numLitCodes = this.getBits(5) + 257;
var numDistCodes = this.getBits(5) + 1; var numDistCodes = this.getBits(5) + 1;
var numCodeLenCodes = this.getBits(4) + 4; var numCodeLenCodes = this.getBits(4) + 4;
@ -30165,11 +30165,11 @@ var FlateStream = (function FlateStreamClosure() {
var bitsLength, bitsOffset, what; var bitsLength, bitsOffset, what;
while (i < codes) { while (i < codes) {
var code = this.getCode(codeLenCodeTab); var code = this.getCode(codeLenCodeTab);
if (code == 16) { if (code === 16) {
bitsLength = 2; bitsOffset = 3; what = len; bitsLength = 2; bitsOffset = 3; what = len;
} else if (code == 17) { } else if (code === 17) {
bitsLength = 3; bitsOffset = 3; what = (len = 0); bitsLength = 3; bitsOffset = 3; what = (len = 0);
} else if (code == 18) { } else if (code === 18) {
bitsLength = 7; bitsOffset = 11; what = (len = 0); bitsLength = 7; bitsOffset = 11; what = (len = 0);
} else { } else {
codeLengths[i++] = len = code; codeLengths[i++] = len = code;
@ -30203,7 +30203,7 @@ var FlateStream = (function FlateStreamClosure() {
buffer[pos++] = code1; buffer[pos++] = code1;
continue; continue;
} }
if (code1 == 256) { if (code1 === 256) {
this.bufferLength = pos; this.bufferLength = pos;
return; return;
} }
@ -30524,7 +30524,7 @@ var JpegStream = (function JpegStreamClosure() {
function JpegStream_isNativelyDecodable(xref, res) { function JpegStream_isNativelyDecodable(xref, res) {
var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res); var cs = ColorSpace.parse(this.dict.get('ColorSpace', 'CS'), xref, res);
var numComps = cs.numComps; var numComps = cs.numComps;
return numComps == 1 || numComps == 3; return numComps === 1 || numComps === 3;
}; };
return JpegStream; return JpegStream;
@ -30744,7 +30744,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
var i; var i;
// special code for z // special code for z
if (c == Z_LOWER_CHAR) { if (c === Z_LOWER_CHAR) {
buffer = this.ensureBuffer(bufferLength + 4); buffer = this.ensureBuffer(bufferLength + 4);
for (i = 0; i < 4; ++i) { for (i = 0; i < 4; ++i) {
buffer[bufferLength + i] = 0; buffer[bufferLength + i] = 0;
@ -30761,7 +30761,7 @@ var Ascii85Stream = (function Ascii85StreamClosure() {
input[i] = c; input[i] = c;
if (c === EOF || c == TILDA_CHAR) { if (c === EOF || c === TILDA_CHAR) {
break; break;
} }
} }
@ -30868,7 +30868,7 @@ var RunLengthStream = (function RunLengthStreamClosure() {
// (in addition to the second byte from the header), n = 129 through 255 - // (in addition to the second byte from the header), n = 129 through 255 -
// duplicate the second byte from the header (257 - n) times, n = 128 - end. // duplicate the second byte from the header (257 - n) times, n = 128 - end.
var repeatHeader = this.str.getBytes(2); var repeatHeader = this.str.getBytes(2);
if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] == 128) { if (!repeatHeader || repeatHeader.length < 2 || repeatHeader[0] === 128) {
this.eof = true; this.eof = true;
return; return;
} }
@ -31361,7 +31361,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
while ((code1 = this.lookBits(12)) === 0) { while ((code1 = this.lookBits(12)) === 0) {
this.eatBits(1); this.eatBits(1);
} }
if (code1 == 1) { if (code1 === 1) {
this.eatBits(12); this.eatBits(12);
} }
if (this.encoding > 0) { if (this.encoding > 0) {
@ -31620,7 +31620,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
var gotEOL = false; var gotEOL = false;
if (!this.eoblock && this.row == this.rows - 1) { if (!this.eoblock && this.row === this.rows - 1) {
this.eof = true; this.eof = true;
} else { } else {
code1 = this.lookBits(12); code1 = this.lookBits(12);
@ -31628,10 +31628,10 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
this.eatBits(1); this.eatBits(1);
code1 = this.lookBits(12); code1 = this.lookBits(12);
} }
if (code1 == 1) { if (code1 === 1) {
this.eatBits(12); this.eatBits(12);
gotEOL = true; gotEOL = true;
} else if (code1 == EOF) { } else if (code1 === EOF) {
this.eof = true; this.eof = true;
} }
} }
@ -31643,7 +31643,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
if (this.eoblock && gotEOL) { if (this.eoblock && gotEOL) {
code1 = this.lookBits(12); code1 = this.lookBits(12);
if (code1 == 1) { if (code1 === 1) {
this.eatBits(12); this.eatBits(12);
if (this.encoding > 0) { if (this.encoding > 0) {
this.lookBits(1); this.lookBits(1);
@ -31652,7 +31652,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
if (this.encoding >= 0) { if (this.encoding >= 0) {
for (i = 0; i < 4; ++i) { for (i = 0; i < 4; ++i) {
code1 = this.lookBits(12); code1 = this.lookBits(12);
if (code1 != 1) { if (code1 !== 1) {
info('bad rtc code: ' + code1); info('bad rtc code: ' + code1);
} }
this.eatBits(12); this.eatBits(12);
@ -31667,11 +31667,11 @@ 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 === EOF) {
this.eof = true; this.eof = true;
return null; return null;
} }
if ((code1 >> 1) == 1) { if ((code1 >> 1) === 1) {
break; break;
} }
this.eatBits(1); this.eatBits(1);
@ -31747,7 +31747,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 === EOF) {
return [true, 1, false]; return [true, 1, false];
} }
if (i < end) { if (i < end) {
@ -31755,7 +31755,7 @@ var CCITTFaxStream = (function CCITTFaxStreamClosure() {
} }
if (!limitValue || code >= limitValue) { if (!limitValue || code >= limitValue) {
var p = table[code - limitValue]; var p = table[code - limitValue];
if (p[0] == i) { if (p[0] === i) {
this.eatBits(i); this.eatBits(i);
return [true, p[1], true]; return [true, p[1], true];
} }
@ -31793,7 +31793,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 === EOF) {
return 1; return 1;
} }
@ -31829,7 +31829,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 === EOF) {
return 1; return 1;
} }
if ((code >> 7) === 0) { if ((code >> 7) === 0) {
@ -31977,7 +31977,7 @@ var LZWStream = (function LZWStreamClosure() {
} else { } else {
currentSequence[currentSequenceLength++] = currentSequence[0]; currentSequence[currentSequenceLength++] = currentSequence[0];
} }
} else if (code == 256) { } else if (code === 256) {
codeLength = 9; codeLength = 9;
nextCode = 258; nextCode = 258;
currentSequenceLength = 0; currentSequenceLength = 0;

2
package.json

@ -1,6 +1,6 @@
{ {
"name": "pdfjs-dist", "name": "pdfjs-dist",
"version": "1.0.566", "version": "1.0.569",
"description": "Generic build of Mozilla's PDF.js library.", "description": "Generic build of Mozilla's PDF.js library.",
"keywords": [ "keywords": [
"Mozilla", "Mozilla",

Loading…
Cancel
Save