|
@@ -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.5.452';
|
|
|
|
-var pdfjsBuild = '230b1e3';
|
|
|
|
|
|
+var pdfjsVersion = '1.5.454';
|
|
|
|
+var pdfjsBuild = '03588cc';
|
|
|
|
|
|
var pdfjsFilePath =
|
|
var pdfjsFilePath =
|
|
typeof document !== 'undefined' && document.currentScript ?
|
|
typeof document !== 'undefined' && document.currentScript ?
|
|
@@ -12175,10 +12175,11 @@ exports.JpegImage = JpegImage;
|
|
}(this, function (exports, sharedUtil, coreArithmeticDecoder) {
|
|
}(this, function (exports, sharedUtil, coreArithmeticDecoder) {
|
|
|
|
|
|
var info = sharedUtil.info;
|
|
var info = sharedUtil.info;
|
|
|
|
+var warn = sharedUtil.warn;
|
|
|
|
+var error = sharedUtil.error;
|
|
var log2 = sharedUtil.log2;
|
|
var log2 = sharedUtil.log2;
|
|
var readUint16 = sharedUtil.readUint16;
|
|
var readUint16 = sharedUtil.readUint16;
|
|
var readUint32 = sharedUtil.readUint32;
|
|
var readUint32 = sharedUtil.readUint32;
|
|
-var warn = sharedUtil.warn;
|
|
|
|
var ArithmeticDecoder = coreArithmeticDecoder.ArithmeticDecoder;
|
|
var ArithmeticDecoder = coreArithmeticDecoder.ArithmeticDecoder;
|
|
|
|
|
|
var JpxImage = (function JpxImageClosure() {
|
|
var JpxImage = (function JpxImageClosure() {
|
|
@@ -12220,7 +12221,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
lbox = length - position + headerSize;
|
|
lbox = length - position + headerSize;
|
|
}
|
|
}
|
|
if (lbox < headerSize) {
|
|
if (lbox < headerSize) {
|
|
- throw new Error('JPX Error: Invalid box field size');
|
|
|
|
|
|
+ error('JPX Error: Invalid box field size');
|
|
}
|
|
}
|
|
var dataLength = lbox - headerSize;
|
|
var dataLength = lbox - headerSize;
|
|
var jumpDataLength = true;
|
|
var jumpDataLength = true;
|
|
@@ -12298,12 +12299,12 @@ var JpxImage = (function JpxImageClosure() {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- throw new Error('JPX Error: No size marker found in JPX stream');
|
|
|
|
|
|
+ error('JPX Error: No size marker found in JPX stream');
|
|
},
|
|
},
|
|
parseCodestream: function JpxImage_parseCodestream(data, start, end) {
|
|
parseCodestream: function JpxImage_parseCodestream(data, start, end) {
|
|
var context = {};
|
|
var context = {};
|
|
|
|
+ var doNotRecover = false;
|
|
try {
|
|
try {
|
|
- var doNotRecover = false;
|
|
|
|
var position = start;
|
|
var position = start;
|
|
while (position + 1 < end) {
|
|
while (position + 1 < end) {
|
|
var code = readUint16(data, position);
|
|
var code = readUint16(data, position);
|
|
@@ -12366,7 +12367,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
scalarExpounded = true;
|
|
scalarExpounded = true;
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
- throw new Error('JPX Error: Invalid SQcd value ' + sqcd);
|
|
|
|
|
|
+ throw new Error('Invalid SQcd value ' + sqcd);
|
|
}
|
|
}
|
|
qcd.noQuantization = (spqcdSize === 8);
|
|
qcd.noQuantization = (spqcdSize === 8);
|
|
qcd.scalarExpounded = scalarExpounded;
|
|
qcd.scalarExpounded = scalarExpounded;
|
|
@@ -12418,7 +12419,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
scalarExpounded = true;
|
|
scalarExpounded = true;
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
- throw new Error('JPX Error: Invalid SQcd value ' + sqcd);
|
|
|
|
|
|
+ throw new Error('Invalid SQcd value ' + sqcd);
|
|
}
|
|
}
|
|
qcc.noQuantization = (spqcdSize === 8);
|
|
qcc.noQuantization = (spqcdSize === 8);
|
|
qcc.scalarExpounded = scalarExpounded;
|
|
qcc.scalarExpounded = scalarExpounded;
|
|
@@ -12496,7 +12497,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
}
|
|
}
|
|
if (unsupported.length > 0) {
|
|
if (unsupported.length > 0) {
|
|
doNotRecover = true;
|
|
doNotRecover = true;
|
|
- throw new Error('JPX Error: Unsupported COD options (' +
|
|
|
|
|
|
+ throw new Error('Unsupported COD options (' +
|
|
unsupported.join(', ') + ')');
|
|
unsupported.join(', ') + ')');
|
|
}
|
|
}
|
|
if (context.mainHeader) {
|
|
if (context.mainHeader) {
|
|
@@ -12544,19 +12545,18 @@ var JpxImage = (function JpxImageClosure() {
|
|
// skipping content
|
|
// skipping content
|
|
break;
|
|
break;
|
|
case 0xFF53: // Coding style component (COC)
|
|
case 0xFF53: // Coding style component (COC)
|
|
- throw new Error('JPX Error: Codestream code 0xFF53 (COC) is ' +
|
|
|
|
|
|
+ throw new Error('Codestream code 0xFF53 (COC) is ' +
|
|
'not implemented');
|
|
'not implemented');
|
|
default:
|
|
default:
|
|
- throw new Error('JPX Error: Unknown codestream code: ' +
|
|
|
|
- code.toString(16));
|
|
|
|
|
|
+ throw new Error('Unknown codestream code: ' + code.toString(16));
|
|
}
|
|
}
|
|
position += length;
|
|
position += length;
|
|
}
|
|
}
|
|
} catch (e) {
|
|
} catch (e) {
|
|
if (doNotRecover || this.failOnCorruptedImage) {
|
|
if (doNotRecover || this.failOnCorruptedImage) {
|
|
- throw e;
|
|
|
|
|
|
+ error('JPX Error: ' + e.message);
|
|
} else {
|
|
} else {
|
|
- warn('Trying to recover from ' + e.message);
|
|
|
|
|
|
+ warn('JPX: Trying to recover from: ' + e.message);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
this.tiles = transformComponents(context);
|
|
this.tiles = transformComponents(context);
|
|
@@ -12806,7 +12806,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
}
|
|
}
|
|
r = 0;
|
|
r = 0;
|
|
}
|
|
}
|
|
- throw new Error('JPX Error: Out of packets');
|
|
|
|
|
|
+ error('JPX Error: Out of packets');
|
|
};
|
|
};
|
|
}
|
|
}
|
|
function ResolutionLayerComponentPositionIterator(context) {
|
|
function ResolutionLayerComponentPositionIterator(context) {
|
|
@@ -12846,7 +12846,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
}
|
|
}
|
|
l = 0;
|
|
l = 0;
|
|
}
|
|
}
|
|
- throw new Error('JPX Error: Out of packets');
|
|
|
|
|
|
+ error('JPX Error: Out of packets');
|
|
};
|
|
};
|
|
}
|
|
}
|
|
function ResolutionPositionComponentLayerIterator(context) {
|
|
function ResolutionPositionComponentLayerIterator(context) {
|
|
@@ -12905,7 +12905,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
}
|
|
}
|
|
p = 0;
|
|
p = 0;
|
|
}
|
|
}
|
|
- throw new Error('JPX Error: Out of packets');
|
|
|
|
|
|
+ error('JPX Error: Out of packets');
|
|
};
|
|
};
|
|
}
|
|
}
|
|
function PositionComponentResolutionLayerIterator(context) {
|
|
function PositionComponentResolutionLayerIterator(context) {
|
|
@@ -12952,7 +12952,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
}
|
|
}
|
|
px = 0;
|
|
px = 0;
|
|
}
|
|
}
|
|
- throw new Error('JPX Error: Out of packets');
|
|
|
|
|
|
+ error('JPX Error: Out of packets');
|
|
};
|
|
};
|
|
}
|
|
}
|
|
function ComponentPositionResolutionLayerIterator(context) {
|
|
function ComponentPositionResolutionLayerIterator(context) {
|
|
@@ -12998,7 +12998,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
}
|
|
}
|
|
py = 0;
|
|
py = 0;
|
|
}
|
|
}
|
|
- throw new Error('JPX Error: Out of packets');
|
|
|
|
|
|
+ error('JPX Error: Out of packets');
|
|
};
|
|
};
|
|
}
|
|
}
|
|
function getPrecinctIndexIfExist(
|
|
function getPrecinctIndexIfExist(
|
|
@@ -13178,8 +13178,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
new ComponentPositionResolutionLayerIterator(context);
|
|
new ComponentPositionResolutionLayerIterator(context);
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
- throw new Error('JPX Error: Unsupported progression order ' +
|
|
|
|
- progressionOrder);
|
|
|
|
|
|
+ error('JPX Error: Unsupported progression order ' + progressionOrder);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
function parseTilePackets(context, data, offset, dataLength) {
|
|
function parseTilePackets(context, data, offset, dataLength) {
|
|
@@ -14116,7 +14115,7 @@ var JpxImage = (function JpxImageClosure() {
|
|
(decoder.readBit(contexts, UNIFORM_CONTEXT) << 1) |
|
|
(decoder.readBit(contexts, UNIFORM_CONTEXT) << 1) |
|
|
decoder.readBit(contexts, UNIFORM_CONTEXT);
|
|
decoder.readBit(contexts, UNIFORM_CONTEXT);
|
|
if (symbol !== 0xA) {
|
|
if (symbol !== 0xA) {
|
|
- throw new Error('JPX Error: Invalid segmentation symbol');
|
|
|
|
|
|
+ error('JPX Error: Invalid segmentation symbol');
|
|
}
|
|
}
|
|
}
|
|
}
|
|
};
|
|
};
|