Browse Source

PDF.js version 1.5.250 - See mozilla/pdf.js@c1c199d70277a2a42fe1ac12ef598248076ac829

master v1.5.250
Pdf Bot 9 years ago
parent
commit
67de9ce7ee
  1. 2
      bower.json
  2. 98
      build/pdf.combined.js
  3. 4
      build/pdf.js
  4. 98
      build/pdf.worker.js
  5. 2
      package.json

2
bower.json

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

98
build/pdf.combined.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {})); @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfCombined = {}));
// Use strict in our context only - users might not want it
'use strict';
var pdfjsVersion = '1.5.248';
var pdfjsBuild = '69cf8c5';
var pdfjsVersion = '1.5.250';
var pdfjsBuild = 'c1c199d';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
@ -22466,7 +22466,7 @@ var JpegStream = (function JpegStreamClosure() { @@ -22466,7 +22466,7 @@ var JpegStream = (function JpegStreamClosure() {
// checking if values needs to be transformed before conversion
if (this.forceRGB && this.dict && isArray(this.dict.get('Decode'))) {
var decodeArr = this.dict.get('Decode');
var decodeArr = this.dict.getArray('Decode');
var bitsPerComponent = this.dict.get('BitsPerComponent') || 8;
var decodeArrLength = decodeArr.length;
var transform = new Int32Array(decodeArrLength);
@ -22606,8 +22606,8 @@ var Jbig2Stream = (function Jbig2StreamClosure() { @@ -22606,8 +22606,8 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
var jbig2Image = new Jbig2Image();
var chunks = [], xref = this.dict.xref;
var decodeParams = xref.fetchIfRef(this.dict.get('DecodeParms'));
var chunks = [];
var decodeParams = this.dict.getArray('DecodeParms');
// According to the PDF specification, DecodeParms can be either
// a dictionary, or an array whose elements are dictionaries.
@ -22616,7 +22616,7 @@ var Jbig2Stream = (function Jbig2StreamClosure() { @@ -22616,7 +22616,7 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
warn('JBIG2 - \'DecodeParms\' array with multiple elements ' +
'not supported.');
}
decodeParams = xref.fetchIfRef(decodeParams[0]);
decodeParams = decodeParams[0];
}
if (decodeParams && decodeParams.has('JBIG2Globals')) {
var globalsStream = decodeParams.get('JBIG2Globals');
@ -37562,8 +37562,8 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -37562,8 +37562,8 @@ var PDFFunction = (function PDFFunctionClosure() {
}
return out;
}
var domain = dict.get('Domain');
var range = dict.get('Range');
var domain = dict.getArray('Domain');
var range = dict.getArray('Range');
if (!domain || !range) {
error('No domain or range');
@ -37584,7 +37584,7 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -37584,7 +37584,7 @@ var PDFFunction = (function PDFFunctionClosure() {
info('No support for cubic spline interpolation: ' + order);
}
var encode = dict.get('Encode');
var encode = dict.getArray('Encode');
if (!encode) {
encode = [];
for (var i = 0; i < inputSize; ++i) {
@ -37594,7 +37594,7 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -37594,7 +37594,7 @@ var PDFFunction = (function PDFFunctionClosure() {
}
encode = toMultiArray(encode);
var decode = dict.get('Decode');
var decode = dict.getArray('Decode');
if (!decode) {
decode = range;
} else {
@ -37696,8 +37696,8 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -37696,8 +37696,8 @@ var PDFFunction = (function PDFFunctionClosure() {
constructInterpolated: function PDFFunction_constructInterpolated(str,
dict) {
var c0 = dict.get('C0') || [0];
var c1 = dict.get('C1') || [1];
var c0 = dict.getArray('C0') || [0];
var c1 = dict.getArray('C1') || [1];
var n = dict.get('N');
if (!isArray(c0) || !isArray(c1)) {
@ -37732,7 +37732,7 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -37732,7 +37732,7 @@ var PDFFunction = (function PDFFunctionClosure() {
},
constructStiched: function PDFFunction_constructStiched(fn, dict, xref) {
var domain = dict.get('Domain');
var domain = dict.getArray('Domain');
if (!domain) {
error('No domain');
@ -37749,8 +37749,8 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -37749,8 +37749,8 @@ var PDFFunction = (function PDFFunctionClosure() {
fns.push(PDFFunction.getIR(xref, xref.fetchIfRef(fnRefs[i])));
}
var bounds = dict.get('Bounds');
var encode = dict.get('Encode');
var bounds = dict.getArray('Bounds');
var encode = dict.getArray('Encode');
return [CONSTRUCT_STICHED, domain, bounds, encode, fns];
},
@ -37812,8 +37812,8 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -37812,8 +37812,8 @@ var PDFFunction = (function PDFFunctionClosure() {
constructPostScript: function PDFFunction_constructPostScript(fn, dict,
xref) {
var domain = dict.get('Domain');
var range = dict.get('Range');
var domain = dict.getArray('Domain');
var range = dict.getArray('Range');
if (!domain) {
error('No domain.');
@ -40778,16 +40778,16 @@ var ColorSpace = (function ColorSpaceClosure() { @@ -40778,16 +40778,16 @@ var ColorSpace = (function ColorSpaceClosure() {
return 'DeviceCmykCS';
case 'CalGray':
params = xref.fetchIfRef(cs[1]);
whitePoint = params.get('WhitePoint');
blackPoint = params.get('BlackPoint');
whitePoint = params.getArray('WhitePoint');
blackPoint = params.getArray('BlackPoint');
gamma = params.get('Gamma');
return ['CalGrayCS', whitePoint, blackPoint, gamma];
case 'CalRGB':
params = xref.fetchIfRef(cs[1]);
whitePoint = params.get('WhitePoint');
blackPoint = params.get('BlackPoint');
gamma = params.get('Gamma');
var matrix = params.get('Matrix');
whitePoint = params.getArray('WhitePoint');
blackPoint = params.getArray('BlackPoint');
gamma = params.getArray('Gamma');
var matrix = params.getArray('Matrix');
return ['CalRGBCS', whitePoint, blackPoint, gamma, matrix];
case 'ICCBased':
var stream = xref.fetchIfRef(cs[1]);
@ -40841,9 +40841,9 @@ var ColorSpace = (function ColorSpaceClosure() { @@ -40841,9 +40841,9 @@ var ColorSpace = (function ColorSpaceClosure() {
return ['AlternateCS', numComps, alt, tintFnIR];
case 'Lab':
params = xref.fetchIfRef(cs[1]);
whitePoint = params.get('WhitePoint');
blackPoint = params.get('BlackPoint');
var range = params.get('Range');
whitePoint = params.getArray('WhitePoint');
blackPoint = params.getArray('BlackPoint');
var range = params.getArray('Range');
return ['LabCS', whitePoint, blackPoint, range];
default:
error('unimplemented color space object "' + mode + '"');
@ -42198,7 +42198,7 @@ var PDFImage = (function PDFImageClosure() { @@ -42198,7 +42198,7 @@ var PDFImage = (function PDFImageClosure() {
this.numComps = this.colorSpace.numComps;
}
this.decode = dict.get('Decode', 'D');
this.decode = dict.getArray('Decode', 'D');
this.needsDecode = false;
if (this.decode &&
((this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode)) ||
@ -42849,7 +42849,7 @@ var Catalog = (function CatalogClosure() { @@ -42849,7 +42849,7 @@ var Catalog = (function CatalogClosure() {
var title = outlineDict.get('Title');
var flags = outlineDict.get('F') || 0;
var color = outlineDict.get('C'), rgbColor = blackColor;
var color = outlineDict.getArray('C'), rgbColor = blackColor;
// We only need to parse the color when it's valid, and non-default.
if (isArray(color) && color.length === 3 &&
(color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) {
@ -44375,7 +44375,7 @@ Shadings.SMALL_NUMBER = 1e-6; @@ -44375,7 +44375,7 @@ Shadings.SMALL_NUMBER = 1e-6;
Shadings.RadialAxial = (function RadialAxialClosure() {
function RadialAxial(dict, matrix, xref, res) {
this.matrix = matrix;
this.coordsArr = dict.get('Coords');
this.coordsArr = dict.getArray('Coords');
this.shadingType = dict.get('ShadingType');
this.type = 'Pattern';
var cs = dict.get('ColorSpace', 'CS');
@ -44384,14 +44384,14 @@ Shadings.RadialAxial = (function RadialAxialClosure() { @@ -44384,14 +44384,14 @@ Shadings.RadialAxial = (function RadialAxialClosure() {
var t0 = 0.0, t1 = 1.0;
if (dict.has('Domain')) {
var domainArr = dict.get('Domain');
var domainArr = dict.getArray('Domain');
t0 = domainArr[0];
t1 = domainArr[1];
}
var extendStart = false, extendEnd = false;
if (dict.has('Extend')) {
var extendArr = dict.get('Extend');
var extendArr = dict.getArray('Extend');
extendStart = extendArr[0];
extendEnd = extendArr[1];
}
@ -44996,7 +44996,7 @@ Shadings.Mesh = (function MeshClosure() { @@ -44996,7 +44996,7 @@ Shadings.Mesh = (function MeshClosure() {
this.matrix = matrix;
this.shadingType = dict.get('ShadingType');
this.type = 'Pattern';
this.bbox = dict.get('BBox');
this.bbox = dict.getArray('BBox');
var cs = dict.get('ColorSpace', 'CS');
cs = ColorSpace.parse(cs, xref, res);
this.cs = cs;
@ -45014,7 +45014,7 @@ Shadings.Mesh = (function MeshClosure() { @@ -45014,7 +45014,7 @@ Shadings.Mesh = (function MeshClosure() {
bitsPerCoordinate: dict.get('BitsPerCoordinate'),
bitsPerComponent: dict.get('BitsPerComponent'),
bitsPerFlag: dict.get('BitsPerFlag'),
decode: dict.get('Decode'),
decode: dict.getArray('Decode'),
colorFn: fn,
colorSpace: cs,
numComps: fn ? 1 : cs.numComps
@ -45081,8 +45081,8 @@ Shadings.Dummy = (function DummyClosure() { @@ -45081,8 +45081,8 @@ Shadings.Dummy = (function DummyClosure() {
})();
function getTilingPatternIR(operatorList, dict, args) {
var matrix = dict.get('Matrix');
var bbox = dict.get('BBox');
var matrix = dict.getArray('Matrix');
var bbox = dict.getArray('BBox');
var xstep = dict.get('XStep');
var ystep = dict.get('YStep');
var paintType = dict.get('PaintType');
@ -45216,7 +45216,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -45216,7 +45216,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
function NativeImageDecoder_isSupported(image, xref, res) {
var cs = ColorSpace.parse(image.dict.get('ColorSpace', 'CS'), xref, res);
return (cs.name === 'DeviceGray' || cs.name === 'DeviceRGB') &&
cs.isDefaultDecode(image.dict.get('Decode', 'D'));
cs.isDefaultDecode(image.dict.getArray('Decode', 'D'));
};
/**
* Checks if the image can be decoded by the browser.
@ -45225,7 +45225,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -45225,7 +45225,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
function NativeImageDecoder_isDecodable(image, xref, res) {
var cs = ColorSpace.parse(image.dict.get('ColorSpace', 'CS'), xref, res);
return (cs.numComps === 1 || cs.numComps === 3) &&
cs.isDefaultDecode(image.dict.get('Decode', 'D'));
cs.isDefaultDecode(image.dict.getArray('Decode', 'D'));
};
function PartialEvaluator(pdfManager, xref, handler, pageIndex,
@ -45415,7 +45415,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -45415,7 +45415,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
var height = dict.get('Height', 'H');
var bitStrideLength = (width + 7) >> 3;
var imgArray = image.getBytes(bitStrideLength * height);
var decode = dict.get('Decode', 'D');
var decode = dict.getArray('Decode', 'D');
var inverseDecode = (!!decode && decode[0] > 0);
imgData = PDFImage.createMask(imgArray, width, height,
@ -45856,7 +45856,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -45856,7 +45856,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
dict, operatorList, task);
} else if (typeNum === SHADING_PATTERN) {
var shading = dict.get('Shading');
var matrix = dict.get('Matrix');
var matrix = dict.getArray('Matrix');
pattern = Pattern.parseShading(shading, matrix, xref, resources,
this.handler);
operatorList.addOp(fn, pattern.getIR());
@ -46637,7 +46637,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -46637,7 +46637,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
}
stateManager.save();
var matrix = xobj.dict.get('Matrix');
var matrix = xobj.dict.getArray('Matrix');
if (isArray(matrix) && matrix.length === 6) {
stateManager.transform(matrix);
}
@ -47234,7 +47234,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -47234,7 +47234,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
// is a tagged pdf. Create a barbebones one to get by.
descriptor = new Dict(null);
descriptor.set('FontName', Name.get(type));
descriptor.set('FontBBox', dict.get('FontBBox'));
descriptor.set('FontBBox', dict.getArray('FontBBox'));
} else {
// Before PDF 1.5 if the font was one of the base 14 fonts, having a
// FontDescriptor was not required.
@ -47336,10 +47336,10 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -47336,10 +47336,10 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
composite: composite,
wideChars: composite,
fixedPitch: false,
fontMatrix: (dict.get('FontMatrix') || FONT_IDENTITY_MATRIX),
fontMatrix: (dict.getArray('FontMatrix') || FONT_IDENTITY_MATRIX),
firstChar: firstChar || 0,
lastChar: (lastChar || maxCharIndex),
bbox: descriptor.get('FontBBox'),
bbox: descriptor.getArray('FontBBox'),
ascent: descriptor.get('Ascent'),
descent: descriptor.get('Descent'),
xHeight: descriptor.get('XHeight'),
@ -48451,7 +48451,7 @@ var Annotation = (function AnnotationClosure() { @@ -48451,7 +48451,7 @@ var Annotation = (function AnnotationClosure() {
this.setFlags(dict.get('F'));
this.setRectangle(dict.getArray('Rect'));
this.setColor(dict.get('C'));
this.setColor(dict.getArray('C'));
this.setBorderStyle(dict);
this.appearance = getDefaultAppearance(dict);
@ -48602,10 +48602,10 @@ var Annotation = (function AnnotationClosure() { @@ -48602,10 +48602,10 @@ var Annotation = (function AnnotationClosure() {
dictType.name === 'Border')) {
this.borderStyle.setWidth(dict.get('W'));
this.borderStyle.setStyle(dict.get('S'));
this.borderStyle.setDashArray(dict.get('D'));
this.borderStyle.setDashArray(dict.getArray('D'));
}
} else if (borderStyle.has('Border')) {
var array = borderStyle.get('Border');
var array = borderStyle.getArray('Border');
if (isArray(array) && array.length >= 3) {
this.borderStyle.setHorizontalCornerRadius(array[0]);
this.borderStyle.setVerticalCornerRadius(array[1]);
@ -48677,8 +48677,8 @@ var Annotation = (function AnnotationClosure() { @@ -48677,8 +48677,8 @@ var Annotation = (function AnnotationClosure() {
// ProcSet
// Properties
]);
var bbox = appearanceDict.get('BBox') || [0, 0, 1, 1];
var matrix = appearanceDict.get('Matrix') || [1, 0, 0, 1, 0 ,0];
var bbox = appearanceDict.getArray('BBox') || [0, 0, 1, 1];
var matrix = appearanceDict.getArray('Matrix') || [1, 0, 0, 1, 0 ,0];
var transform = getTransformMatrix(data.rect, bbox, matrix);
var self = this;
@ -49097,7 +49097,7 @@ var PopupAnnotation = (function PopupAnnotationClosure() { @@ -49097,7 +49097,7 @@ var PopupAnnotation = (function PopupAnnotationClosure() {
// Fall back to the default background color.
this.data.color = null;
} else {
this.setColor(parentItem.get('C'));
this.setColor(parentItem.getArray('C'));
this.data.color = this.color;
}
}

4
build/pdf.js

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {})); @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdf = {}));
// Use strict in our context only - users might not want it
'use strict';
var pdfjsVersion = '1.5.248';
var pdfjsBuild = '69cf8c5';
var pdfjsVersion = '1.5.250';
var pdfjsBuild = 'c1c199d';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?

98
build/pdf.worker.js vendored

@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {})); @@ -28,8 +28,8 @@ factory((root.pdfjsDistBuildPdfWorker = {}));
// Use strict in our context only - users might not want it
'use strict';
var pdfjsVersion = '1.5.248';
var pdfjsBuild = '69cf8c5';
var pdfjsVersion = '1.5.250';
var pdfjsBuild = 'c1c199d';
var pdfjsFilePath =
typeof document !== 'undefined' && document.currentScript ?
@ -20586,7 +20586,7 @@ var JpegStream = (function JpegStreamClosure() { @@ -20586,7 +20586,7 @@ var JpegStream = (function JpegStreamClosure() {
// checking if values needs to be transformed before conversion
if (this.forceRGB && this.dict && isArray(this.dict.get('Decode'))) {
var decodeArr = this.dict.get('Decode');
var decodeArr = this.dict.getArray('Decode');
var bitsPerComponent = this.dict.get('BitsPerComponent') || 8;
var decodeArrLength = decodeArr.length;
var transform = new Int32Array(decodeArrLength);
@ -20726,8 +20726,8 @@ var Jbig2Stream = (function Jbig2StreamClosure() { @@ -20726,8 +20726,8 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
var jbig2Image = new Jbig2Image();
var chunks = [], xref = this.dict.xref;
var decodeParams = xref.fetchIfRef(this.dict.get('DecodeParms'));
var chunks = [];
var decodeParams = this.dict.getArray('DecodeParms');
// According to the PDF specification, DecodeParms can be either
// a dictionary, or an array whose elements are dictionaries.
@ -20736,7 +20736,7 @@ var Jbig2Stream = (function Jbig2StreamClosure() { @@ -20736,7 +20736,7 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
warn('JBIG2 - \'DecodeParms\' array with multiple elements ' +
'not supported.');
}
decodeParams = xref.fetchIfRef(decodeParams[0]);
decodeParams = decodeParams[0];
}
if (decodeParams && decodeParams.has('JBIG2Globals')) {
var globalsStream = decodeParams.get('JBIG2Globals');
@ -31393,8 +31393,8 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -31393,8 +31393,8 @@ var PDFFunction = (function PDFFunctionClosure() {
}
return out;
}
var domain = dict.get('Domain');
var range = dict.get('Range');
var domain = dict.getArray('Domain');
var range = dict.getArray('Range');
if (!domain || !range) {
error('No domain or range');
@ -31415,7 +31415,7 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -31415,7 +31415,7 @@ var PDFFunction = (function PDFFunctionClosure() {
info('No support for cubic spline interpolation: ' + order);
}
var encode = dict.get('Encode');
var encode = dict.getArray('Encode');
if (!encode) {
encode = [];
for (var i = 0; i < inputSize; ++i) {
@ -31425,7 +31425,7 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -31425,7 +31425,7 @@ var PDFFunction = (function PDFFunctionClosure() {
}
encode = toMultiArray(encode);
var decode = dict.get('Decode');
var decode = dict.getArray('Decode');
if (!decode) {
decode = range;
} else {
@ -31527,8 +31527,8 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -31527,8 +31527,8 @@ var PDFFunction = (function PDFFunctionClosure() {
constructInterpolated: function PDFFunction_constructInterpolated(str,
dict) {
var c0 = dict.get('C0') || [0];
var c1 = dict.get('C1') || [1];
var c0 = dict.getArray('C0') || [0];
var c1 = dict.getArray('C1') || [1];
var n = dict.get('N');
if (!isArray(c0) || !isArray(c1)) {
@ -31563,7 +31563,7 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -31563,7 +31563,7 @@ var PDFFunction = (function PDFFunctionClosure() {
},
constructStiched: function PDFFunction_constructStiched(fn, dict, xref) {
var domain = dict.get('Domain');
var domain = dict.getArray('Domain');
if (!domain) {
error('No domain');
@ -31580,8 +31580,8 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -31580,8 +31580,8 @@ var PDFFunction = (function PDFFunctionClosure() {
fns.push(PDFFunction.getIR(xref, xref.fetchIfRef(fnRefs[i])));
}
var bounds = dict.get('Bounds');
var encode = dict.get('Encode');
var bounds = dict.getArray('Bounds');
var encode = dict.getArray('Encode');
return [CONSTRUCT_STICHED, domain, bounds, encode, fns];
},
@ -31643,8 +31643,8 @@ var PDFFunction = (function PDFFunctionClosure() { @@ -31643,8 +31643,8 @@ var PDFFunction = (function PDFFunctionClosure() {
constructPostScript: function PDFFunction_constructPostScript(fn, dict,
xref) {
var domain = dict.get('Domain');
var range = dict.get('Range');
var domain = dict.getArray('Domain');
var range = dict.getArray('Range');
if (!domain) {
error('No domain.');
@ -32718,16 +32718,16 @@ var ColorSpace = (function ColorSpaceClosure() { @@ -32718,16 +32718,16 @@ var ColorSpace = (function ColorSpaceClosure() {
return 'DeviceCmykCS';
case 'CalGray':
params = xref.fetchIfRef(cs[1]);
whitePoint = params.get('WhitePoint');
blackPoint = params.get('BlackPoint');
whitePoint = params.getArray('WhitePoint');
blackPoint = params.getArray('BlackPoint');
gamma = params.get('Gamma');
return ['CalGrayCS', whitePoint, blackPoint, gamma];
case 'CalRGB':
params = xref.fetchIfRef(cs[1]);
whitePoint = params.get('WhitePoint');
blackPoint = params.get('BlackPoint');
gamma = params.get('Gamma');
var matrix = params.get('Matrix');
whitePoint = params.getArray('WhitePoint');
blackPoint = params.getArray('BlackPoint');
gamma = params.getArray('Gamma');
var matrix = params.getArray('Matrix');
return ['CalRGBCS', whitePoint, blackPoint, gamma, matrix];
case 'ICCBased':
var stream = xref.fetchIfRef(cs[1]);
@ -32781,9 +32781,9 @@ var ColorSpace = (function ColorSpaceClosure() { @@ -32781,9 +32781,9 @@ var ColorSpace = (function ColorSpaceClosure() {
return ['AlternateCS', numComps, alt, tintFnIR];
case 'Lab':
params = xref.fetchIfRef(cs[1]);
whitePoint = params.get('WhitePoint');
blackPoint = params.get('BlackPoint');
var range = params.get('Range');
whitePoint = params.getArray('WhitePoint');
blackPoint = params.getArray('BlackPoint');
var range = params.getArray('Range');
return ['LabCS', whitePoint, blackPoint, range];
default:
error('unimplemented color space object "' + mode + '"');
@ -33856,7 +33856,7 @@ var PDFImage = (function PDFImageClosure() { @@ -33856,7 +33856,7 @@ var PDFImage = (function PDFImageClosure() {
this.numComps = this.colorSpace.numComps;
}
this.decode = dict.get('Decode', 'D');
this.decode = dict.getArray('Decode', 'D');
this.needsDecode = false;
if (this.decode &&
((this.colorSpace && !this.colorSpace.isDefaultDecode(this.decode)) ||
@ -34507,7 +34507,7 @@ var Catalog = (function CatalogClosure() { @@ -34507,7 +34507,7 @@ var Catalog = (function CatalogClosure() {
var title = outlineDict.get('Title');
var flags = outlineDict.get('F') || 0;
var color = outlineDict.get('C'), rgbColor = blackColor;
var color = outlineDict.getArray('C'), rgbColor = blackColor;
// We only need to parse the color when it's valid, and non-default.
if (isArray(color) && color.length === 3 &&
(color[0] !== 0 || color[1] !== 0 || color[2] !== 0)) {
@ -36033,7 +36033,7 @@ Shadings.SMALL_NUMBER = 1e-6; @@ -36033,7 +36033,7 @@ Shadings.SMALL_NUMBER = 1e-6;
Shadings.RadialAxial = (function RadialAxialClosure() {
function RadialAxial(dict, matrix, xref, res) {
this.matrix = matrix;
this.coordsArr = dict.get('Coords');
this.coordsArr = dict.getArray('Coords');
this.shadingType = dict.get('ShadingType');
this.type = 'Pattern';
var cs = dict.get('ColorSpace', 'CS');
@ -36042,14 +36042,14 @@ Shadings.RadialAxial = (function RadialAxialClosure() { @@ -36042,14 +36042,14 @@ Shadings.RadialAxial = (function RadialAxialClosure() {
var t0 = 0.0, t1 = 1.0;
if (dict.has('Domain')) {
var domainArr = dict.get('Domain');
var domainArr = dict.getArray('Domain');
t0 = domainArr[0];
t1 = domainArr[1];
}
var extendStart = false, extendEnd = false;
if (dict.has('Extend')) {
var extendArr = dict.get('Extend');
var extendArr = dict.getArray('Extend');
extendStart = extendArr[0];
extendEnd = extendArr[1];
}
@ -36654,7 +36654,7 @@ Shadings.Mesh = (function MeshClosure() { @@ -36654,7 +36654,7 @@ Shadings.Mesh = (function MeshClosure() {
this.matrix = matrix;
this.shadingType = dict.get('ShadingType');
this.type = 'Pattern';
this.bbox = dict.get('BBox');
this.bbox = dict.getArray('BBox');
var cs = dict.get('ColorSpace', 'CS');
cs = ColorSpace.parse(cs, xref, res);
this.cs = cs;
@ -36672,7 +36672,7 @@ Shadings.Mesh = (function MeshClosure() { @@ -36672,7 +36672,7 @@ Shadings.Mesh = (function MeshClosure() {
bitsPerCoordinate: dict.get('BitsPerCoordinate'),
bitsPerComponent: dict.get('BitsPerComponent'),
bitsPerFlag: dict.get('BitsPerFlag'),
decode: dict.get('Decode'),
decode: dict.getArray('Decode'),
colorFn: fn,
colorSpace: cs,
numComps: fn ? 1 : cs.numComps
@ -36739,8 +36739,8 @@ Shadings.Dummy = (function DummyClosure() { @@ -36739,8 +36739,8 @@ Shadings.Dummy = (function DummyClosure() {
})();
function getTilingPatternIR(operatorList, dict, args) {
var matrix = dict.get('Matrix');
var bbox = dict.get('BBox');
var matrix = dict.getArray('Matrix');
var bbox = dict.getArray('BBox');
var xstep = dict.get('XStep');
var ystep = dict.get('YStep');
var paintType = dict.get('PaintType');
@ -36874,7 +36874,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -36874,7 +36874,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
function NativeImageDecoder_isSupported(image, xref, res) {
var cs = ColorSpace.parse(image.dict.get('ColorSpace', 'CS'), xref, res);
return (cs.name === 'DeviceGray' || cs.name === 'DeviceRGB') &&
cs.isDefaultDecode(image.dict.get('Decode', 'D'));
cs.isDefaultDecode(image.dict.getArray('Decode', 'D'));
};
/**
* Checks if the image can be decoded by the browser.
@ -36883,7 +36883,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -36883,7 +36883,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
function NativeImageDecoder_isDecodable(image, xref, res) {
var cs = ColorSpace.parse(image.dict.get('ColorSpace', 'CS'), xref, res);
return (cs.numComps === 1 || cs.numComps === 3) &&
cs.isDefaultDecode(image.dict.get('Decode', 'D'));
cs.isDefaultDecode(image.dict.getArray('Decode', 'D'));
};
function PartialEvaluator(pdfManager, xref, handler, pageIndex,
@ -37073,7 +37073,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -37073,7 +37073,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
var height = dict.get('Height', 'H');
var bitStrideLength = (width + 7) >> 3;
var imgArray = image.getBytes(bitStrideLength * height);
var decode = dict.get('Decode', 'D');
var decode = dict.getArray('Decode', 'D');
var inverseDecode = (!!decode && decode[0] > 0);
imgData = PDFImage.createMask(imgArray, width, height,
@ -37514,7 +37514,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -37514,7 +37514,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
dict, operatorList, task);
} else if (typeNum === SHADING_PATTERN) {
var shading = dict.get('Shading');
var matrix = dict.get('Matrix');
var matrix = dict.getArray('Matrix');
pattern = Pattern.parseShading(shading, matrix, xref, resources,
this.handler);
operatorList.addOp(fn, pattern.getIR());
@ -38295,7 +38295,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -38295,7 +38295,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
}
stateManager.save();
var matrix = xobj.dict.get('Matrix');
var matrix = xobj.dict.getArray('Matrix');
if (isArray(matrix) && matrix.length === 6) {
stateManager.transform(matrix);
}
@ -38892,7 +38892,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -38892,7 +38892,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
// is a tagged pdf. Create a barbebones one to get by.
descriptor = new Dict(null);
descriptor.set('FontName', Name.get(type));
descriptor.set('FontBBox', dict.get('FontBBox'));
descriptor.set('FontBBox', dict.getArray('FontBBox'));
} else {
// Before PDF 1.5 if the font was one of the base 14 fonts, having a
// FontDescriptor was not required.
@ -38994,10 +38994,10 @@ var PartialEvaluator = (function PartialEvaluatorClosure() { @@ -38994,10 +38994,10 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
composite: composite,
wideChars: composite,
fixedPitch: false,
fontMatrix: (dict.get('FontMatrix') || FONT_IDENTITY_MATRIX),
fontMatrix: (dict.getArray('FontMatrix') || FONT_IDENTITY_MATRIX),
firstChar: firstChar || 0,
lastChar: (lastChar || maxCharIndex),
bbox: descriptor.get('FontBBox'),
bbox: descriptor.getArray('FontBBox'),
ascent: descriptor.get('Ascent'),
descent: descriptor.get('Descent'),
xHeight: descriptor.get('XHeight'),
@ -40109,7 +40109,7 @@ var Annotation = (function AnnotationClosure() { @@ -40109,7 +40109,7 @@ var Annotation = (function AnnotationClosure() {
this.setFlags(dict.get('F'));
this.setRectangle(dict.getArray('Rect'));
this.setColor(dict.get('C'));
this.setColor(dict.getArray('C'));
this.setBorderStyle(dict);
this.appearance = getDefaultAppearance(dict);
@ -40260,10 +40260,10 @@ var Annotation = (function AnnotationClosure() { @@ -40260,10 +40260,10 @@ var Annotation = (function AnnotationClosure() {
dictType.name === 'Border')) {
this.borderStyle.setWidth(dict.get('W'));
this.borderStyle.setStyle(dict.get('S'));
this.borderStyle.setDashArray(dict.get('D'));
this.borderStyle.setDashArray(dict.getArray('D'));
}
} else if (borderStyle.has('Border')) {
var array = borderStyle.get('Border');
var array = borderStyle.getArray('Border');
if (isArray(array) && array.length >= 3) {
this.borderStyle.setHorizontalCornerRadius(array[0]);
this.borderStyle.setVerticalCornerRadius(array[1]);
@ -40335,8 +40335,8 @@ var Annotation = (function AnnotationClosure() { @@ -40335,8 +40335,8 @@ var Annotation = (function AnnotationClosure() {
// ProcSet
// Properties
]);
var bbox = appearanceDict.get('BBox') || [0, 0, 1, 1];
var matrix = appearanceDict.get('Matrix') || [1, 0, 0, 1, 0 ,0];
var bbox = appearanceDict.getArray('BBox') || [0, 0, 1, 1];
var matrix = appearanceDict.getArray('Matrix') || [1, 0, 0, 1, 0 ,0];
var transform = getTransformMatrix(data.rect, bbox, matrix);
var self = this;
@ -40755,7 +40755,7 @@ var PopupAnnotation = (function PopupAnnotationClosure() { @@ -40755,7 +40755,7 @@ var PopupAnnotation = (function PopupAnnotationClosure() {
// Fall back to the default background color.
this.data.color = null;
} else {
this.setColor(parentItem.get('C'));
this.setColor(parentItem.getArray('C'));
this.data.color = this.color;
}
}

2
package.json

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

Loading…
Cancel
Save