Fix inconsistent spacing and trailing commas in objects in src/core/
files, so we can enable the comma-dangle
and object-curly-spacing
ESLint rules later on
*Unfortunately this patch is fairly big, even though it only covers the `src/core` folder, but splitting it even further seemed difficult.* http://eslint.org/docs/rules/comma-dangle http://eslint.org/docs/rules/object-curly-spacing Given that we currently have quite inconsistent object formatting, fixing this in *one* big patch probably wouldn't be feasible (since I cannot imagine anyone wanting to review that); hence I've opted to try and do this piecewise instead. Please note: This patch was created automatically, using the ESLint --fix command line option. In a couple of places this caused lines to become too long, and I've fixed those manually; please refer to the interdiff below for the only hand-edits in this patch. ```diff diff --git a/src/core/evaluator.js b/src/core/evaluator.js index abab9027..dcd3594b 100644 --- a/src/core/evaluator.js +++ b/src/core/evaluator.js @@ -2785,7 +2785,8 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() { t['Tz'] = { id: OPS.setHScale, numArgs: 1, variableArgs: false, }; t['TL'] = { id: OPS.setLeading, numArgs: 1, variableArgs: false, }; t['Tf'] = { id: OPS.setFont, numArgs: 2, variableArgs: false, }; - t['Tr'] = { id: OPS.setTextRenderingMode, numArgs: 1, variableArgs: false, }; + t['Tr'] = { id: OPS.setTextRenderingMode, numArgs: 1, + variableArgs: false, }; t['Ts'] = { id: OPS.setTextRise, numArgs: 1, variableArgs: false, }; t['Td'] = { id: OPS.moveText, numArgs: 2, variableArgs: false, }; t['TD'] = { id: OPS.setLeadingMoveText, numArgs: 2, variableArgs: false, }; diff --git a/src/core/jbig2.js b/src/core/jbig2.js index 5a17d482..71671541 100644 --- a/src/core/jbig2.js +++ b/src/core/jbig2.js @@ -123,19 +123,22 @@ var Jbig2Image = (function Jbig2ImageClosure() { { x: -1, y: -1, }, { x: 0, y: -1, }, { x: 1, y: -1, }, { x: -2, y: 0, }, { x: -1, y: 0, }], [{ x: -3, y: -1, }, { x: -2, y: -1, }, { x: -1, y: -1, }, { x: 0, y: -1, }, - { x: 1, y: -1, }, { x: -4, y: 0, }, { x: -3, y: 0, }, { x: -2, y: 0, }, { x: -1, y: 0, }] + { x: 1, y: -1, }, { x: -4, y: 0, }, { x: -3, y: 0, }, { x: -2, y: 0, }, + { x: -1, y: 0, }] ]; var RefinementTemplates = [ { coding: [{ x: 0, y: -1, }, { x: 1, y: -1, }, { x: -1, y: 0, }], - reference: [{ x: 0, y: -1, }, { x: 1, y: -1, }, { x: -1, y: 0, }, { x: 0, y: 0, }, - { x: 1, y: 0, }, { x: -1, y: 1, }, { x: 0, y: 1, }, { x: 1, y: 1, }], + reference: [{ x: 0, y: -1, }, { x: 1, y: -1, }, { x: -1, y: 0, }, + { x: 0, y: 0, }, { x: 1, y: 0, }, { x: -1, y: 1, }, + { x: 0, y: 1, }, { x: 1, y: 1, }], }, { - coding: [{ x: -1, y: -1, }, { x: 0, y: -1, }, { x: 1, y: -1, }, { x: -1, y: 0, }], - reference: [{ x: 0, y: -1, }, { x: -1, y: 0, }, { x: 0, y: 0, }, { x: 1, y: 0, }, - { x: 0, y: 1, }, { x: 1, y: 1, }], + coding: [{ x: -1, y: -1, }, { x: 0, y: -1, }, { x: 1, y: -1, }, + { x: -1, y: 0, }], + reference: [{ x: 0, y: -1, }, { x: -1, y: 0, }, { x: 0, y: 0, }, + { x: 1, y: 0, }, { x: 0, y: 1, }, { x: 1, y: 1, }], } ]; ```
This commit is contained in:
parent
593dec1bb7
commit
a8c87f8019
@ -111,7 +111,7 @@ AnnotationFactory.prototype = /** @lends AnnotationFactory.prototype */ {
|
||||
}
|
||||
return new Annotation(parameters);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
var Annotation = (function AnnotationClosure() {
|
||||
@ -435,7 +435,7 @@ var Annotation = (function AnnotationClosure() {
|
||||
return opList;
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Annotation;
|
||||
@ -573,7 +573,7 @@ var AnnotationBorderStyle = (function AnnotationBorderStyleClosure() {
|
||||
if (radius === (radius | 0)) {
|
||||
this.verticalCornerRadius = radius;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return AnnotationBorderStyle;
|
||||
@ -736,7 +736,7 @@ var TextWidgetAnnotation = (function TextWidgetAnnotationClosure() {
|
||||
}).then(function () {
|
||||
return operatorList;
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return TextWidgetAnnotation;
|
||||
@ -806,7 +806,7 @@ var ButtonWidgetAnnotation = (function ButtonWidgetAnnotationClosure() {
|
||||
renderForms);
|
||||
}
|
||||
return Promise.resolve(operatorList);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return ButtonWidgetAnnotation;
|
||||
@ -867,7 +867,7 @@ var ChoiceWidgetAnnotation = (function ChoiceWidgetAnnotationClosure() {
|
||||
|
||||
return Annotation.prototype.getOperatorList.call(this, evaluator, task,
|
||||
renderForms);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return ChoiceWidgetAnnotation;
|
||||
|
@ -24,53 +24,53 @@
|
||||
var ArithmeticDecoder = (function ArithmeticDecoderClosure() {
|
||||
// Table C-2
|
||||
var QeTable = [
|
||||
{qe: 0x5601, nmps: 1, nlps: 1, switchFlag: 1},
|
||||
{qe: 0x3401, nmps: 2, nlps: 6, switchFlag: 0},
|
||||
{qe: 0x1801, nmps: 3, nlps: 9, switchFlag: 0},
|
||||
{qe: 0x0AC1, nmps: 4, nlps: 12, switchFlag: 0},
|
||||
{qe: 0x0521, nmps: 5, nlps: 29, switchFlag: 0},
|
||||
{qe: 0x0221, nmps: 38, nlps: 33, switchFlag: 0},
|
||||
{qe: 0x5601, nmps: 7, nlps: 6, switchFlag: 1},
|
||||
{qe: 0x5401, nmps: 8, nlps: 14, switchFlag: 0},
|
||||
{qe: 0x4801, nmps: 9, nlps: 14, switchFlag: 0},
|
||||
{qe: 0x3801, nmps: 10, nlps: 14, switchFlag: 0},
|
||||
{qe: 0x3001, nmps: 11, nlps: 17, switchFlag: 0},
|
||||
{qe: 0x2401, nmps: 12, nlps: 18, switchFlag: 0},
|
||||
{qe: 0x1C01, nmps: 13, nlps: 20, switchFlag: 0},
|
||||
{qe: 0x1601, nmps: 29, nlps: 21, switchFlag: 0},
|
||||
{qe: 0x5601, nmps: 15, nlps: 14, switchFlag: 1},
|
||||
{qe: 0x5401, nmps: 16, nlps: 14, switchFlag: 0},
|
||||
{qe: 0x5101, nmps: 17, nlps: 15, switchFlag: 0},
|
||||
{qe: 0x4801, nmps: 18, nlps: 16, switchFlag: 0},
|
||||
{qe: 0x3801, nmps: 19, nlps: 17, switchFlag: 0},
|
||||
{qe: 0x3401, nmps: 20, nlps: 18, switchFlag: 0},
|
||||
{qe: 0x3001, nmps: 21, nlps: 19, switchFlag: 0},
|
||||
{qe: 0x2801, nmps: 22, nlps: 19, switchFlag: 0},
|
||||
{qe: 0x2401, nmps: 23, nlps: 20, switchFlag: 0},
|
||||
{qe: 0x2201, nmps: 24, nlps: 21, switchFlag: 0},
|
||||
{qe: 0x1C01, nmps: 25, nlps: 22, switchFlag: 0},
|
||||
{qe: 0x1801, nmps: 26, nlps: 23, switchFlag: 0},
|
||||
{qe: 0x1601, nmps: 27, nlps: 24, switchFlag: 0},
|
||||
{qe: 0x1401, nmps: 28, nlps: 25, switchFlag: 0},
|
||||
{qe: 0x1201, nmps: 29, nlps: 26, switchFlag: 0},
|
||||
{qe: 0x1101, nmps: 30, nlps: 27, switchFlag: 0},
|
||||
{qe: 0x0AC1, nmps: 31, nlps: 28, switchFlag: 0},
|
||||
{qe: 0x09C1, nmps: 32, nlps: 29, switchFlag: 0},
|
||||
{qe: 0x08A1, nmps: 33, nlps: 30, switchFlag: 0},
|
||||
{qe: 0x0521, nmps: 34, nlps: 31, switchFlag: 0},
|
||||
{qe: 0x0441, nmps: 35, nlps: 32, switchFlag: 0},
|
||||
{qe: 0x02A1, nmps: 36, nlps: 33, switchFlag: 0},
|
||||
{qe: 0x0221, nmps: 37, nlps: 34, switchFlag: 0},
|
||||
{qe: 0x0141, nmps: 38, nlps: 35, switchFlag: 0},
|
||||
{qe: 0x0111, nmps: 39, nlps: 36, switchFlag: 0},
|
||||
{qe: 0x0085, nmps: 40, nlps: 37, switchFlag: 0},
|
||||
{qe: 0x0049, nmps: 41, nlps: 38, switchFlag: 0},
|
||||
{qe: 0x0025, nmps: 42, nlps: 39, switchFlag: 0},
|
||||
{qe: 0x0015, nmps: 43, nlps: 40, switchFlag: 0},
|
||||
{qe: 0x0009, nmps: 44, nlps: 41, switchFlag: 0},
|
||||
{qe: 0x0005, nmps: 45, nlps: 42, switchFlag: 0},
|
||||
{qe: 0x0001, nmps: 45, nlps: 43, switchFlag: 0},
|
||||
{qe: 0x5601, nmps: 46, nlps: 46, switchFlag: 0}
|
||||
{ qe: 0x5601, nmps: 1, nlps: 1, switchFlag: 1, },
|
||||
{ qe: 0x3401, nmps: 2, nlps: 6, switchFlag: 0, },
|
||||
{ qe: 0x1801, nmps: 3, nlps: 9, switchFlag: 0, },
|
||||
{ qe: 0x0AC1, nmps: 4, nlps: 12, switchFlag: 0, },
|
||||
{ qe: 0x0521, nmps: 5, nlps: 29, switchFlag: 0, },
|
||||
{ qe: 0x0221, nmps: 38, nlps: 33, switchFlag: 0, },
|
||||
{ qe: 0x5601, nmps: 7, nlps: 6, switchFlag: 1, },
|
||||
{ qe: 0x5401, nmps: 8, nlps: 14, switchFlag: 0, },
|
||||
{ qe: 0x4801, nmps: 9, nlps: 14, switchFlag: 0, },
|
||||
{ qe: 0x3801, nmps: 10, nlps: 14, switchFlag: 0, },
|
||||
{ qe: 0x3001, nmps: 11, nlps: 17, switchFlag: 0, },
|
||||
{ qe: 0x2401, nmps: 12, nlps: 18, switchFlag: 0, },
|
||||
{ qe: 0x1C01, nmps: 13, nlps: 20, switchFlag: 0, },
|
||||
{ qe: 0x1601, nmps: 29, nlps: 21, switchFlag: 0, },
|
||||
{ qe: 0x5601, nmps: 15, nlps: 14, switchFlag: 1, },
|
||||
{ qe: 0x5401, nmps: 16, nlps: 14, switchFlag: 0, },
|
||||
{ qe: 0x5101, nmps: 17, nlps: 15, switchFlag: 0, },
|
||||
{ qe: 0x4801, nmps: 18, nlps: 16, switchFlag: 0, },
|
||||
{ qe: 0x3801, nmps: 19, nlps: 17, switchFlag: 0, },
|
||||
{ qe: 0x3401, nmps: 20, nlps: 18, switchFlag: 0, },
|
||||
{ qe: 0x3001, nmps: 21, nlps: 19, switchFlag: 0, },
|
||||
{ qe: 0x2801, nmps: 22, nlps: 19, switchFlag: 0, },
|
||||
{ qe: 0x2401, nmps: 23, nlps: 20, switchFlag: 0, },
|
||||
{ qe: 0x2201, nmps: 24, nlps: 21, switchFlag: 0, },
|
||||
{ qe: 0x1C01, nmps: 25, nlps: 22, switchFlag: 0, },
|
||||
{ qe: 0x1801, nmps: 26, nlps: 23, switchFlag: 0, },
|
||||
{ qe: 0x1601, nmps: 27, nlps: 24, switchFlag: 0, },
|
||||
{ qe: 0x1401, nmps: 28, nlps: 25, switchFlag: 0, },
|
||||
{ qe: 0x1201, nmps: 29, nlps: 26, switchFlag: 0, },
|
||||
{ qe: 0x1101, nmps: 30, nlps: 27, switchFlag: 0, },
|
||||
{ qe: 0x0AC1, nmps: 31, nlps: 28, switchFlag: 0, },
|
||||
{ qe: 0x09C1, nmps: 32, nlps: 29, switchFlag: 0, },
|
||||
{ qe: 0x08A1, nmps: 33, nlps: 30, switchFlag: 0, },
|
||||
{ qe: 0x0521, nmps: 34, nlps: 31, switchFlag: 0, },
|
||||
{ qe: 0x0441, nmps: 35, nlps: 32, switchFlag: 0, },
|
||||
{ qe: 0x02A1, nmps: 36, nlps: 33, switchFlag: 0, },
|
||||
{ qe: 0x0221, nmps: 37, nlps: 34, switchFlag: 0, },
|
||||
{ qe: 0x0141, nmps: 38, nlps: 35, switchFlag: 0, },
|
||||
{ qe: 0x0111, nmps: 39, nlps: 36, switchFlag: 0, },
|
||||
{ qe: 0x0085, nmps: 40, nlps: 37, switchFlag: 0, },
|
||||
{ qe: 0x0049, nmps: 41, nlps: 38, switchFlag: 0, },
|
||||
{ qe: 0x0025, nmps: 42, nlps: 39, switchFlag: 0, },
|
||||
{ qe: 0x0015, nmps: 43, nlps: 40, switchFlag: 0, },
|
||||
{ qe: 0x0009, nmps: 44, nlps: 41, switchFlag: 0, },
|
||||
{ qe: 0x0005, nmps: 45, nlps: 42, switchFlag: 0, },
|
||||
{ qe: 0x0001, nmps: 45, nlps: 43, switchFlag: 0, },
|
||||
{ qe: 0x5601, nmps: 46, nlps: 46, switchFlag: 0, }
|
||||
];
|
||||
|
||||
// C.3.5 Initialisation of the decoder (INITDEC)
|
||||
@ -174,7 +174,7 @@ var ArithmeticDecoder = (function ArithmeticDecoderClosure() {
|
||||
|
||||
contexts[pos] = cx_index << 1 | cx_mps;
|
||||
return d;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return ArithmeticDecoder;
|
||||
|
@ -105,7 +105,7 @@ function reverseValues(arr, start, end) {
|
||||
function createBidiText(str, isLTR, vertical) {
|
||||
return {
|
||||
str,
|
||||
dir: (vertical ? 'ttb' : (isLTR ? 'ltr' : 'rtl'))
|
||||
dir: (vertical ? 'ttb' : (isLTR ? 'ltr' : 'rtl')),
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -100,97 +100,97 @@ var CFFStandardStrings = [
|
||||
var CFFParser = (function CFFParserClosure() {
|
||||
var CharstringValidationData = [
|
||||
null,
|
||||
{ id: 'hstem', min: 2, stackClearing: true, stem: true },
|
||||
{ id: 'hstem', min: 2, stackClearing: true, stem: true, },
|
||||
null,
|
||||
{ id: 'vstem', min: 2, stackClearing: true, stem: true },
|
||||
{ id: 'vmoveto', min: 1, stackClearing: true },
|
||||
{ id: 'rlineto', min: 2, resetStack: true },
|
||||
{ id: 'hlineto', min: 1, resetStack: true },
|
||||
{ id: 'vlineto', min: 1, resetStack: true },
|
||||
{ id: 'rrcurveto', min: 6, resetStack: true },
|
||||
{ id: 'vstem', min: 2, stackClearing: true, stem: true, },
|
||||
{ id: 'vmoveto', min: 1, stackClearing: true, },
|
||||
{ id: 'rlineto', min: 2, resetStack: true, },
|
||||
{ id: 'hlineto', min: 1, resetStack: true, },
|
||||
{ id: 'vlineto', min: 1, resetStack: true, },
|
||||
{ id: 'rrcurveto', min: 6, resetStack: true, },
|
||||
null,
|
||||
{ id: 'callsubr', min: 1, undefStack: true },
|
||||
{ id: 'return', min: 0, undefStack: true },
|
||||
{ id: 'callsubr', min: 1, undefStack: true, },
|
||||
{ id: 'return', min: 0, undefStack: true, },
|
||||
null, // 12
|
||||
null,
|
||||
{ id: 'endchar', min: 0, stackClearing: true },
|
||||
{ id: 'endchar', min: 0, stackClearing: true, },
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{ id: 'hstemhm', min: 2, stackClearing: true, stem: true },
|
||||
{ id: 'hintmask', min: 0, stackClearing: true },
|
||||
{ id: 'cntrmask', min: 0, stackClearing: true },
|
||||
{ id: 'rmoveto', min: 2, stackClearing: true },
|
||||
{ id: 'hmoveto', min: 1, stackClearing: true },
|
||||
{ id: 'vstemhm', min: 2, stackClearing: true, stem: true },
|
||||
{ id: 'rcurveline', min: 8, resetStack: true },
|
||||
{ id: 'rlinecurve', min: 8, resetStack: true },
|
||||
{ id: 'vvcurveto', min: 4, resetStack: true },
|
||||
{ id: 'hhcurveto', min: 4, resetStack: true },
|
||||
{ id: 'hstemhm', min: 2, stackClearing: true, stem: true, },
|
||||
{ id: 'hintmask', min: 0, stackClearing: true, },
|
||||
{ id: 'cntrmask', min: 0, stackClearing: true, },
|
||||
{ id: 'rmoveto', min: 2, stackClearing: true, },
|
||||
{ id: 'hmoveto', min: 1, stackClearing: true, },
|
||||
{ id: 'vstemhm', min: 2, stackClearing: true, stem: true, },
|
||||
{ id: 'rcurveline', min: 8, resetStack: true, },
|
||||
{ id: 'rlinecurve', min: 8, resetStack: true, },
|
||||
{ id: 'vvcurveto', min: 4, resetStack: true, },
|
||||
{ id: 'hhcurveto', min: 4, resetStack: true, },
|
||||
null, // shortint
|
||||
{ id: 'callgsubr', min: 1, undefStack: true },
|
||||
{ id: 'vhcurveto', min: 4, resetStack: true },
|
||||
{ id: 'hvcurveto', min: 4, resetStack: true }
|
||||
{ id: 'callgsubr', min: 1, undefStack: true, },
|
||||
{ id: 'vhcurveto', min: 4, resetStack: true, },
|
||||
{ id: 'hvcurveto', min: 4, resetStack: true, }
|
||||
];
|
||||
var CharstringValidationData12 = [
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{ id: 'and', min: 2, stackDelta: -1 },
|
||||
{ id: 'or', min: 2, stackDelta: -1 },
|
||||
{ id: 'not', min: 1, stackDelta: 0 },
|
||||
{ id: 'and', min: 2, stackDelta: -1, },
|
||||
{ id: 'or', min: 2, stackDelta: -1, },
|
||||
{ id: 'not', min: 1, stackDelta: 0, },
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{ id: 'abs', min: 1, stackDelta: 0 },
|
||||
{ id: 'abs', min: 1, stackDelta: 0, },
|
||||
{ id: 'add', min: 2, stackDelta: -1,
|
||||
stackFn: function stack_div(stack, index) {
|
||||
stack[index - 2] = stack[index - 2] + stack[index - 1];
|
||||
}
|
||||
},
|
||||
},
|
||||
{ id: 'sub', min: 2, stackDelta: -1,
|
||||
stackFn: function stack_div(stack, index) {
|
||||
stack[index - 2] = stack[index - 2] - stack[index - 1];
|
||||
}
|
||||
},
|
||||
},
|
||||
{ id: 'div', min: 2, stackDelta: -1,
|
||||
stackFn: function stack_div(stack, index) {
|
||||
stack[index - 2] = stack[index - 2] / stack[index - 1];
|
||||
}
|
||||
},
|
||||
},
|
||||
null,
|
||||
{ id: 'neg', min: 1, stackDelta: 0,
|
||||
stackFn: function stack_div(stack, index) {
|
||||
stack[index - 1] = -stack[index - 1];
|
||||
}
|
||||
},
|
||||
},
|
||||
{ id: 'eq', min: 2, stackDelta: -1 },
|
||||
{ id: 'eq', min: 2, stackDelta: -1, },
|
||||
null,
|
||||
null,
|
||||
{ id: 'drop', min: 1, stackDelta: -1 },
|
||||
{ id: 'drop', min: 1, stackDelta: -1, },
|
||||
null,
|
||||
{ id: 'put', min: 2, stackDelta: -2 },
|
||||
{ id: 'get', min: 1, stackDelta: 0 },
|
||||
{ id: 'ifelse', min: 4, stackDelta: -3 },
|
||||
{ id: 'random', min: 0, stackDelta: 1 },
|
||||
{ id: 'put', min: 2, stackDelta: -2, },
|
||||
{ id: 'get', min: 1, stackDelta: 0, },
|
||||
{ id: 'ifelse', min: 4, stackDelta: -3, },
|
||||
{ id: 'random', min: 0, stackDelta: 1, },
|
||||
{ id: 'mul', min: 2, stackDelta: -1,
|
||||
stackFn: function stack_div(stack, index) {
|
||||
stack[index - 2] = stack[index - 2] * stack[index - 1];
|
||||
}
|
||||
},
|
||||
},
|
||||
null,
|
||||
{ id: 'sqrt', min: 1, stackDelta: 0 },
|
||||
{ id: 'dup', min: 1, stackDelta: 1 },
|
||||
{ id: 'exch', min: 2, stackDelta: 0 },
|
||||
{ id: 'index', min: 2, stackDelta: 0 },
|
||||
{ id: 'roll', min: 3, stackDelta: -2 },
|
||||
{ id: 'sqrt', min: 1, stackDelta: 0, },
|
||||
{ id: 'dup', min: 1, stackDelta: 1, },
|
||||
{ id: 'exch', min: 2, stackDelta: 0, },
|
||||
{ id: 'index', min: 2, stackDelta: 0, },
|
||||
{ id: 'roll', min: 3, stackDelta: -2, },
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
{ id: 'hflex', min: 7, resetStack: true },
|
||||
{ id: 'flex', min: 13, resetStack: true },
|
||||
{ id: 'hflex1', min: 9, resetStack: true },
|
||||
{ id: 'flex1', min: 11, resetStack: true }
|
||||
{ id: 'hflex', min: 7, resetStack: true, },
|
||||
{ id: 'flex', min: 13, resetStack: true, },
|
||||
{ id: 'hflex1', min: 9, resetStack: true, },
|
||||
{ id: 'flex1', min: 11, resetStack: true, }
|
||||
];
|
||||
|
||||
function CFFParser(file, properties, seacAnalysisEnabled) {
|
||||
@ -302,7 +302,7 @@ var CFFParser = (function CFFParserClosure() {
|
||||
var hdrSize = bytes[2];
|
||||
var offSize = bytes[3];
|
||||
var header = new CFFHeader(major, minor, hdrSize, offSize);
|
||||
return { obj: header, endPos: hdrSize };
|
||||
return { obj: header, endPos: hdrSize, };
|
||||
},
|
||||
parseDict: function CFFParser_parseDict(dict) {
|
||||
var pos = 0;
|
||||
@ -404,7 +404,7 @@ var CFFParser = (function CFFParserClosure() {
|
||||
var offsetEnd = offsets[i + 1];
|
||||
cffIndex.add(bytes.subarray(offsetStart, offsetEnd));
|
||||
}
|
||||
return {obj: cffIndex, endPos: end};
|
||||
return { obj: cffIndex, endPos: end, };
|
||||
},
|
||||
parseNameIndex: function CFFParser_parseNameIndex(index) {
|
||||
var names = [];
|
||||
@ -618,7 +618,7 @@ var CFFParser = (function CFFParserClosure() {
|
||||
hints: 0,
|
||||
firstStackClearing: true,
|
||||
seac: null,
|
||||
width: null
|
||||
width: null,
|
||||
};
|
||||
var valid = true;
|
||||
var localSubrToUse = null;
|
||||
@ -875,7 +875,7 @@ var CFFParser = (function CFFParserClosure() {
|
||||
assert(fdSelect.length === length, 'parseFDSelect: Invalid font data.');
|
||||
|
||||
return new CFFFDSelect(fdSelect, rawBytes);
|
||||
}
|
||||
},
|
||||
};
|
||||
return CFFParser;
|
||||
})();
|
||||
@ -931,7 +931,7 @@ var CFFStrings = (function CFFStringsClosure() {
|
||||
},
|
||||
get count() {
|
||||
return this.strings.length;
|
||||
}
|
||||
},
|
||||
};
|
||||
return CFFStrings;
|
||||
})();
|
||||
@ -955,7 +955,7 @@ var CFFIndex = (function CFFIndexClosure() {
|
||||
},
|
||||
get count() {
|
||||
return this.objects.length;
|
||||
}
|
||||
},
|
||||
};
|
||||
return CFFIndex;
|
||||
})();
|
||||
@ -1018,7 +1018,7 @@ var CFFDict = (function CFFDictClosure() {
|
||||
},
|
||||
removeByName: function CFFDict_removeByName(name) {
|
||||
delete this.values[this.nameToKeyMap[name]];
|
||||
}
|
||||
},
|
||||
};
|
||||
CFFDict.createTables = function CFFDict_createTables(layout) {
|
||||
var tables = {
|
||||
@ -1027,7 +1027,7 @@ var CFFDict = (function CFFDictClosure() {
|
||||
defaults: {},
|
||||
types: {},
|
||||
opcodes: {},
|
||||
order: []
|
||||
order: [],
|
||||
};
|
||||
for (var i = 0, ii = layout.length; i < ii; ++i) {
|
||||
var entry = layout[i];
|
||||
@ -1132,7 +1132,7 @@ var CFFPrivateDict = (function CFFPrivateDictClosure() {
|
||||
var CFFCharsetPredefinedTypes = {
|
||||
ISO_ADOBE: 0,
|
||||
EXPERT: 1,
|
||||
EXPERT_SUBSET: 2
|
||||
EXPERT_SUBSET: 2,
|
||||
};
|
||||
var CFFCharset = (function CFFCharsetClosure() {
|
||||
function CFFCharset(predefined, format, charset, raw) {
|
||||
@ -1165,7 +1165,7 @@ var CFFFDSelect = (function CFFFDSelectClosure() {
|
||||
return -1;
|
||||
}
|
||||
return this.fdSelect[glyphIndex];
|
||||
}
|
||||
},
|
||||
};
|
||||
return CFFFDSelect;
|
||||
})();
|
||||
@ -1218,7 +1218,7 @@ var CFFOffsetTracker = (function CFFOffsetTrackerClosure() {
|
||||
data[offset3] = (value >> 8) & 0xFF;
|
||||
data[offset4] = value & 0xFF;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
return CFFOffsetTracker;
|
||||
})();
|
||||
@ -1237,7 +1237,7 @@ var CFFCompiler = (function CFFCompilerClosure() {
|
||||
add: function CFFCompiler_add(data) {
|
||||
this.data = this.data.concat(data);
|
||||
this.length = this.data.length;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// Compile the five entries that must be in order.
|
||||
@ -1433,7 +1433,7 @@ var CFFCompiler = (function CFFCompilerClosure() {
|
||||
fdArrayIndex = this.compileIndex(fdArrayIndex, fontDictTrackers);
|
||||
return {
|
||||
trackers: fontDictTrackers,
|
||||
output: fdArrayIndex
|
||||
output: fdArrayIndex,
|
||||
};
|
||||
},
|
||||
compilePrivateDicts: function CFFCompiler_compilePrivateDicts(dicts,
|
||||
@ -1625,7 +1625,7 @@ var CFFCompiler = (function CFFCompilerClosure() {
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
},
|
||||
};
|
||||
return CFFCompiler;
|
||||
})();
|
||||
|
@ -435,12 +435,12 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
|
||||
|
||||
if (prevChunk >= 0 && prevChunk + 1 !== chunk) {
|
||||
groupedChunks.push({ beginChunk,
|
||||
endChunk: prevChunk + 1 });
|
||||
endChunk: prevChunk + 1, });
|
||||
beginChunk = chunk;
|
||||
}
|
||||
if (i + 1 === chunks.length) {
|
||||
groupedChunks.push({ beginChunk,
|
||||
endChunk: chunk + 1 });
|
||||
endChunk: chunk + 1, });
|
||||
}
|
||||
|
||||
prevChunk = chunk;
|
||||
@ -453,7 +453,7 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
|
||||
args.loaded);
|
||||
this.msgHandler.send('DocProgress', {
|
||||
loaded: bytesLoaded,
|
||||
total: this.length
|
||||
total: this.length,
|
||||
});
|
||||
},
|
||||
|
||||
@ -529,7 +529,7 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
|
||||
|
||||
this.msgHandler.send('DocProgress', {
|
||||
loaded: this.stream.numChunksLoaded * this.chunkSize,
|
||||
total: this.length
|
||||
total: this.length,
|
||||
});
|
||||
},
|
||||
|
||||
@ -556,7 +556,7 @@ var ChunkedStreamManager = (function ChunkedStreamManagerClosure() {
|
||||
var capability = this.promisesByRequest[requestId];
|
||||
capability.reject(new Error('Request was aborted'));
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return ChunkedStreamManager;
|
||||
|
@ -335,7 +335,7 @@ var CMap = (function CMapClosure() {
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
},
|
||||
};
|
||||
return CMap;
|
||||
})();
|
||||
@ -404,7 +404,7 @@ var IdentityCMap = (function IdentityCMapClosure() {
|
||||
|
||||
get isIdentityCMap() {
|
||||
error('should not access .isIdentityCMap');
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return IdentityCMap;
|
||||
@ -527,7 +527,7 @@ var BinaryCMapReader = (function BinaryCMapReaderClosure() {
|
||||
s += String.fromCharCode(this.readNumber());
|
||||
}
|
||||
return s;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
function processBinaryCMap(data, cMap, extend) {
|
||||
@ -983,7 +983,7 @@ var CMapFactory = (function CMapFactoryClosure() {
|
||||
});
|
||||
}
|
||||
return Promise.reject(new Error('Encoding required.'));
|
||||
}
|
||||
},
|
||||
};
|
||||
})();
|
||||
|
||||
|
@ -197,7 +197,7 @@ var ColorSpace = (function ColorSpaceClosure() {
|
||||
* This should be true for all colorspaces except for lab color spaces
|
||||
* which are [0,100], [-128, 127], [-128, 127].
|
||||
*/
|
||||
usesZeroToOneRange: true
|
||||
usesZeroToOneRange: true,
|
||||
};
|
||||
|
||||
ColorSpace.parse = function ColorSpace_parse(cs, xref, res) {
|
||||
@ -408,7 +408,7 @@ var ColorSpace = (function ColorSpaceClosure() {
|
||||
},
|
||||
get cmyk() {
|
||||
return shadow(this, 'cmyk', new DeviceCmykCS());
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return ColorSpace;
|
||||
@ -489,7 +489,7 @@ var AlternateCS = (function AlternateCSClosure() {
|
||||
isDefaultDecode: function AlternateCS_isDefaultDecode(decodeMap) {
|
||||
return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
|
||||
},
|
||||
usesZeroToOneRange: true
|
||||
usesZeroToOneRange: true,
|
||||
};
|
||||
|
||||
return AlternateCS;
|
||||
@ -564,7 +564,7 @@ var IndexedCS = (function IndexedCSClosure() {
|
||||
// indexed color maps shouldn't be changed
|
||||
return true;
|
||||
},
|
||||
usesZeroToOneRange: true
|
||||
usesZeroToOneRange: true,
|
||||
};
|
||||
return IndexedCS;
|
||||
})();
|
||||
@ -606,7 +606,7 @@ var DeviceGrayCS = (function DeviceGrayCSClosure() {
|
||||
isDefaultDecode: function DeviceGrayCS_isDefaultDecode(decodeMap) {
|
||||
return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
|
||||
},
|
||||
usesZeroToOneRange: true
|
||||
usesZeroToOneRange: true,
|
||||
};
|
||||
return DeviceGrayCS;
|
||||
})();
|
||||
@ -655,7 +655,7 @@ var DeviceRgbCS = (function DeviceRgbCSClosure() {
|
||||
isDefaultDecode: function DeviceRgbCS_isDefaultDecode(decodeMap) {
|
||||
return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
|
||||
},
|
||||
usesZeroToOneRange: true
|
||||
usesZeroToOneRange: true,
|
||||
};
|
||||
return DeviceRgbCS;
|
||||
})();
|
||||
@ -737,7 +737,7 @@ var DeviceCmykCS = (function DeviceCmykCSClosure() {
|
||||
isDefaultDecode: function DeviceCmykCS_isDefaultDecode(decodeMap) {
|
||||
return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
|
||||
},
|
||||
usesZeroToOneRange: true
|
||||
usesZeroToOneRange: true,
|
||||
};
|
||||
|
||||
return DeviceCmykCS;
|
||||
@ -834,7 +834,7 @@ var CalGrayCS = (function CalGrayCSClosure() {
|
||||
isDefaultDecode: function CalGrayCS_isDefaultDecode(decodeMap) {
|
||||
return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
|
||||
},
|
||||
usesZeroToOneRange: true
|
||||
usesZeroToOneRange: true,
|
||||
};
|
||||
return CalGrayCS;
|
||||
})();
|
||||
@ -1137,7 +1137,7 @@ var CalRGBCS = (function CalRGBCSClosure() {
|
||||
isDefaultDecode: function CalRGBCS_isDefaultDecode(decodeMap) {
|
||||
return ColorSpace.isDefaultDecode(decodeMap, this.numComps);
|
||||
},
|
||||
usesZeroToOneRange: true
|
||||
usesZeroToOneRange: true,
|
||||
};
|
||||
return CalRGBCS;
|
||||
})();
|
||||
@ -1281,7 +1281,7 @@ var LabCS = (function LabCSClosure() {
|
||||
// ranges that are used.
|
||||
return true;
|
||||
},
|
||||
usesZeroToOneRange: false
|
||||
usesZeroToOneRange: false,
|
||||
};
|
||||
return LabCS;
|
||||
})();
|
||||
|
@ -55,7 +55,7 @@ var ARCFourCipher = (function ARCFourCipherClosure() {
|
||||
this.a = a;
|
||||
this.b = b;
|
||||
return output;
|
||||
}
|
||||
},
|
||||
};
|
||||
ARCFourCipher.prototype.decryptBlock = ARCFourCipher.prototype.encryptBlock;
|
||||
|
||||
@ -229,7 +229,7 @@ var Word64 = (function Word64Closure() {
|
||||
assign: function Word64_assign(word) {
|
||||
this.high = word.high;
|
||||
this.low = word.low;
|
||||
}
|
||||
},
|
||||
};
|
||||
return Word64;
|
||||
})();
|
||||
@ -623,7 +623,7 @@ var NullCipher = (function NullCipherClosure() {
|
||||
NullCipher.prototype = {
|
||||
decryptBlock: function NullCipher_decryptBlock(data) {
|
||||
return data;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return NullCipher;
|
||||
@ -1055,7 +1055,7 @@ var AES128Cipher = (function AES128CipherClosure() {
|
||||
output.set(result[i], j);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return AES128Cipher;
|
||||
@ -1487,7 +1487,7 @@ var AES256Cipher = (function AES256CipherClosure() {
|
||||
output.set(result[i], j);
|
||||
}
|
||||
return output;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return AES256Cipher;
|
||||
@ -1555,7 +1555,7 @@ var PDF17 = (function PDF17Closure() {
|
||||
return cipher.decryptBlock(userEncryption,
|
||||
false,
|
||||
new Uint8Array(16));
|
||||
}
|
||||
},
|
||||
};
|
||||
return PDF17;
|
||||
})();
|
||||
@ -1673,7 +1673,7 @@ var PDF20 = (function PDF20Closure() {
|
||||
return cipher.decryptBlock(userEncryption,
|
||||
false,
|
||||
new Uint8Array(16));
|
||||
}
|
||||
},
|
||||
};
|
||||
return PDF20;
|
||||
})();
|
||||
@ -1698,7 +1698,7 @@ var CipherTransform = (function CipherTransformClosure() {
|
||||
var data = stringToBytes(s);
|
||||
data = cipher.decryptBlock(data, true);
|
||||
return bytesToString(data);
|
||||
}
|
||||
},
|
||||
};
|
||||
return CipherTransform;
|
||||
})();
|
||||
@ -2042,7 +2042,7 @@ var CipherTransformFactory = (function CipherTransformFactoryClosure() {
|
||||
return new ARCFourCipher(key);
|
||||
};
|
||||
return new CipherTransform(cipherConstructor, cipherConstructor);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return CipherTransformFactory;
|
||||
|
@ -328,7 +328,7 @@ var Page = (function PageClosure() {
|
||||
}
|
||||
}
|
||||
return shadow(this, 'annotations', annotations);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Page;
|
||||
@ -395,9 +395,9 @@ var PDFDocument = (function PDFDocumentClosure() {
|
||||
Producer: isString,
|
||||
CreationDate: isString,
|
||||
ModDate: isString,
|
||||
Trapped: isName
|
||||
Trapped: isName,
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
PDFDocument.prototype = {
|
||||
@ -529,7 +529,7 @@ var PDFDocument = (function PDFDocumentClosure() {
|
||||
createPage: (pageIndex, dict, ref, fontCache, builtInCMapCache) => {
|
||||
return new Page(this.pdfManager, this.xref, pageIndex, dict, ref,
|
||||
fontCache, builtInCMapCache);
|
||||
}
|
||||
},
|
||||
};
|
||||
this.catalog = new Catalog(this.pdfManager, this.xref, pageFactory);
|
||||
},
|
||||
@ -543,7 +543,7 @@ var PDFDocument = (function PDFDocumentClosure() {
|
||||
var docInfo = {
|
||||
PDFFormatVersion: this.pdfFormatVersion,
|
||||
IsAcroFormPresent: !!this.acroForm,
|
||||
IsXFAPresent: !!this.xfa
|
||||
IsXFAPresent: !!this.xfa,
|
||||
};
|
||||
var infoDict;
|
||||
try {
|
||||
@ -602,7 +602,7 @@ var PDFDocument = (function PDFDocumentClosure() {
|
||||
|
||||
cleanup: function PDFDocument_cleanup() {
|
||||
return this.catalog.cleanup();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return PDFDocument;
|
||||
|
@ -79,7 +79,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
var data = message.data;
|
||||
return new Stream(data, 0, data.length, image.dict);
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
/**
|
||||
* Checks if the image can be decoded and displayed by the browser without any
|
||||
@ -154,7 +154,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
reset: function TimeSlotManager_reset() {
|
||||
this.endTime = Date.now() + TIME_SLOT_DURATION_MS;
|
||||
this.checked = 0;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// Convert PDF blend mode names to HTML5 blend mode names.
|
||||
@ -298,7 +298,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
bbox,
|
||||
smask,
|
||||
isolated: false,
|
||||
knockout: false
|
||||
knockout: false,
|
||||
};
|
||||
|
||||
var groupSubtype = group.get('S');
|
||||
@ -457,7 +457,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
var smaskContent = smask.get('G');
|
||||
var smaskOptions = {
|
||||
subtype: smask.get('S').name,
|
||||
backdrop: smask.get('BC')
|
||||
backdrop: smask.get('BC'),
|
||||
};
|
||||
|
||||
// The SMask might have a alpha/luminosity value transfer function --
|
||||
@ -502,7 +502,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
operatorList.addDependencies(tilingOpList.dependencies);
|
||||
operatorList.addOp(fn, getTilingPatternIR({
|
||||
fnArray: tilingOpList.fnArray,
|
||||
argsArray: tilingOpList.argsArray
|
||||
argsArray: tilingOpList.argsArray,
|
||||
}, patternDict, args));
|
||||
});
|
||||
},
|
||||
@ -527,7 +527,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
}).catch((reason) => {
|
||||
// Error in the font data -- sending unsupported feature notification.
|
||||
this.handler.send('UnsupportedFeature',
|
||||
{featureId: UNSUPPORTED_FEATURES.font});
|
||||
{ featureId: UNSUPPORTED_FEATURES.font, });
|
||||
return new TranslatedFont('g_font_error',
|
||||
new ErrorFont('Type3 font load error: ' + reason), translated.font);
|
||||
});
|
||||
@ -720,7 +720,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
}
|
||||
} else {
|
||||
fontAliases[hash] = {
|
||||
fontID: Font.getFontID()
|
||||
fontID: Font.getFontID(),
|
||||
};
|
||||
}
|
||||
|
||||
@ -783,7 +783,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
// TODO fontCapability.reject?
|
||||
// Error in the font data -- sending unsupported feature notification.
|
||||
this.handler.send('UnsupportedFeature',
|
||||
{featureId: UNSUPPORTED_FEATURES.font});
|
||||
{ featureId: UNSUPPORTED_FEATURES.font, });
|
||||
|
||||
try {
|
||||
// error, but it's still nice to have font type reported
|
||||
@ -1155,7 +1155,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
// Error(s) in the OperatorList -- sending unsupported feature
|
||||
// notification and allow rendering to continue.
|
||||
this.handler.send('UnsupportedFeature',
|
||||
{ featureId: UNSUPPORTED_FEATURES.unknown });
|
||||
{ featureId: UNSUPPORTED_FEATURES.unknown, });
|
||||
warn('getOperatorList - ignoring errors during task: ' + task.name);
|
||||
|
||||
closePendingRestoreOPS();
|
||||
@ -1176,7 +1176,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
|
||||
var textContent = {
|
||||
items: [],
|
||||
styles: Object.create(null)
|
||||
styles: Object.create(null),
|
||||
};
|
||||
var textContentItem = {
|
||||
initialized: false,
|
||||
@ -1193,7 +1193,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
fakeMultiSpaceMax: -0,
|
||||
textRunBreakAllowed: false,
|
||||
transform: null,
|
||||
fontName: null
|
||||
fontName: null,
|
||||
};
|
||||
var SPACE_FACTOR = 0.3;
|
||||
var MULTI_SPACE_FACTOR = 1.5;
|
||||
@ -1220,7 +1220,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
fontFamily: font.fallbackName,
|
||||
ascent: font.ascent,
|
||||
descent: font.descent,
|
||||
vertical: font.vertical
|
||||
vertical: font.vertical,
|
||||
};
|
||||
}
|
||||
textContentItem.fontName = font.loadedName;
|
||||
@ -1306,7 +1306,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
width: textChunk.width,
|
||||
height: textChunk.height,
|
||||
transform: textChunk.transform,
|
||||
fontName: textChunk.fontName
|
||||
fontName: textChunk.fontName,
|
||||
};
|
||||
}
|
||||
|
||||
@ -1711,7 +1711,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
properties.cidSystemInfo = {
|
||||
registry: cidSystemInfo.get('Registry'),
|
||||
ordering: cidSystemInfo.get('Ordering'),
|
||||
supplement: cidSystemInfo.get('Supplement')
|
||||
supplement: cidSystemInfo.get('Supplement'),
|
||||
};
|
||||
}
|
||||
|
||||
@ -2260,7 +2260,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
baseDict,
|
||||
composite,
|
||||
type: type.name,
|
||||
hash: hash ? hash.hexdigest() : ''
|
||||
hash: hash ? hash.hexdigest() : '',
|
||||
};
|
||||
},
|
||||
|
||||
@ -2306,7 +2306,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
defaultWidth: metrics.defaultWidth,
|
||||
flags,
|
||||
firstChar: 0,
|
||||
lastChar: maxCharIndex
|
||||
lastChar: maxCharIndex,
|
||||
};
|
||||
return this.extractDataStructures(dict, dict, properties).
|
||||
then((properties) => {
|
||||
@ -2389,7 +2389,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
capHeight: descriptor.get('CapHeight'),
|
||||
flags: descriptor.get('Flags'),
|
||||
italicAngle: descriptor.get('ItalicAngle'),
|
||||
coded: false
|
||||
coded: false,
|
||||
};
|
||||
|
||||
var cMapPromise;
|
||||
@ -2420,7 +2420,7 @@ var PartialEvaluator = (function PartialEvaluatorClosure() {
|
||||
}
|
||||
return new Font(fontName.name, fontFile, properties);
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return PartialEvaluator;
|
||||
@ -2494,7 +2494,7 @@ var TranslatedFont = (function TranslatedFontClosure() {
|
||||
translatedFont.charProcOperatorList = charProcOperatorList;
|
||||
});
|
||||
return this.type3Loaded;
|
||||
}
|
||||
},
|
||||
};
|
||||
return TranslatedFont;
|
||||
})();
|
||||
@ -2583,7 +2583,7 @@ var OperatorList = (function OperatorListClosure() {
|
||||
return {
|
||||
fnArray: this.fnArray,
|
||||
argsArray: this.argsArray,
|
||||
length: this.length
|
||||
length: this.length,
|
||||
};
|
||||
},
|
||||
|
||||
@ -2603,12 +2603,12 @@ var OperatorList = (function OperatorListClosure() {
|
||||
length,
|
||||
},
|
||||
pageIndex: this.pageIndex,
|
||||
intent: this.intent
|
||||
intent: this.intent,
|
||||
}, transfers);
|
||||
this.dependencies = Object.create(null);
|
||||
this.fnArray.length = 0;
|
||||
this.argsArray.length = 0;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return OperatorList;
|
||||
@ -2633,7 +2633,7 @@ var StateManager = (function StateManagerClosure() {
|
||||
},
|
||||
transform(args) {
|
||||
this.state.ctm = Util.transform(this.state.ctm, args);
|
||||
}
|
||||
},
|
||||
};
|
||||
return StateManager;
|
||||
})();
|
||||
@ -2714,7 +2714,7 @@ var TextState = (function TextStateClosure() {
|
||||
clone.textLineMatrix = this.textLineMatrix.slice();
|
||||
clone.fontMatrix = this.fontMatrix.slice();
|
||||
return clone;
|
||||
}
|
||||
},
|
||||
};
|
||||
return TextState;
|
||||
})();
|
||||
@ -2742,100 +2742,101 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() {
|
||||
// If variableArgs === false: exactly `numArgs` expected
|
||||
var getOPMap = getLookupTableFactory(function (t) {
|
||||
// Graphic state
|
||||
t['w'] = { id: OPS.setLineWidth, numArgs: 1, variableArgs: false };
|
||||
t['J'] = { id: OPS.setLineCap, numArgs: 1, variableArgs: false };
|
||||
t['j'] = { id: OPS.setLineJoin, numArgs: 1, variableArgs: false };
|
||||
t['M'] = { id: OPS.setMiterLimit, numArgs: 1, variableArgs: false };
|
||||
t['d'] = { id: OPS.setDash, numArgs: 2, variableArgs: false };
|
||||
t['ri'] = { id: OPS.setRenderingIntent, numArgs: 1, variableArgs: false };
|
||||
t['i'] = { id: OPS.setFlatness, numArgs: 1, variableArgs: false };
|
||||
t['gs'] = { id: OPS.setGState, numArgs: 1, variableArgs: false };
|
||||
t['q'] = { id: OPS.save, numArgs: 0, variableArgs: false };
|
||||
t['Q'] = { id: OPS.restore, numArgs: 0, variableArgs: false };
|
||||
t['cm'] = { id: OPS.transform, numArgs: 6, variableArgs: false };
|
||||
t['w'] = { id: OPS.setLineWidth, numArgs: 1, variableArgs: false, };
|
||||
t['J'] = { id: OPS.setLineCap, numArgs: 1, variableArgs: false, };
|
||||
t['j'] = { id: OPS.setLineJoin, numArgs: 1, variableArgs: false, };
|
||||
t['M'] = { id: OPS.setMiterLimit, numArgs: 1, variableArgs: false, };
|
||||
t['d'] = { id: OPS.setDash, numArgs: 2, variableArgs: false, };
|
||||
t['ri'] = { id: OPS.setRenderingIntent, numArgs: 1, variableArgs: false, };
|
||||
t['i'] = { id: OPS.setFlatness, numArgs: 1, variableArgs: false, };
|
||||
t['gs'] = { id: OPS.setGState, numArgs: 1, variableArgs: false, };
|
||||
t['q'] = { id: OPS.save, numArgs: 0, variableArgs: false, };
|
||||
t['Q'] = { id: OPS.restore, numArgs: 0, variableArgs: false, };
|
||||
t['cm'] = { id: OPS.transform, numArgs: 6, variableArgs: false, };
|
||||
|
||||
// Path
|
||||
t['m'] = { id: OPS.moveTo, numArgs: 2, variableArgs: false };
|
||||
t['l'] = { id: OPS.lineTo, numArgs: 2, variableArgs: false };
|
||||
t['c'] = { id: OPS.curveTo, numArgs: 6, variableArgs: false };
|
||||
t['v'] = { id: OPS.curveTo2, numArgs: 4, variableArgs: false };
|
||||
t['y'] = { id: OPS.curveTo3, numArgs: 4, variableArgs: false };
|
||||
t['h'] = { id: OPS.closePath, numArgs: 0, variableArgs: false };
|
||||
t['re'] = { id: OPS.rectangle, numArgs: 4, variableArgs: false };
|
||||
t['S'] = { id: OPS.stroke, numArgs: 0, variableArgs: false };
|
||||
t['s'] = { id: OPS.closeStroke, numArgs: 0, variableArgs: false };
|
||||
t['f'] = { id: OPS.fill, numArgs: 0, variableArgs: false };
|
||||
t['F'] = { id: OPS.fill, numArgs: 0, variableArgs: false };
|
||||
t['f*'] = { id: OPS.eoFill, numArgs: 0, variableArgs: false };
|
||||
t['B'] = { id: OPS.fillStroke, numArgs: 0, variableArgs: false };
|
||||
t['B*'] = { id: OPS.eoFillStroke, numArgs: 0, variableArgs: false };
|
||||
t['b'] = { id: OPS.closeFillStroke, numArgs: 0, variableArgs: false };
|
||||
t['b*'] = { id: OPS.closeEOFillStroke, numArgs: 0, variableArgs: false };
|
||||
t['n'] = { id: OPS.endPath, numArgs: 0, variableArgs: false };
|
||||
t['m'] = { id: OPS.moveTo, numArgs: 2, variableArgs: false, };
|
||||
t['l'] = { id: OPS.lineTo, numArgs: 2, variableArgs: false, };
|
||||
t['c'] = { id: OPS.curveTo, numArgs: 6, variableArgs: false, };
|
||||
t['v'] = { id: OPS.curveTo2, numArgs: 4, variableArgs: false, };
|
||||
t['y'] = { id: OPS.curveTo3, numArgs: 4, variableArgs: false, };
|
||||
t['h'] = { id: OPS.closePath, numArgs: 0, variableArgs: false, };
|
||||
t['re'] = { id: OPS.rectangle, numArgs: 4, variableArgs: false, };
|
||||
t['S'] = { id: OPS.stroke, numArgs: 0, variableArgs: false, };
|
||||
t['s'] = { id: OPS.closeStroke, numArgs: 0, variableArgs: false, };
|
||||
t['f'] = { id: OPS.fill, numArgs: 0, variableArgs: false, };
|
||||
t['F'] = { id: OPS.fill, numArgs: 0, variableArgs: false, };
|
||||
t['f*'] = { id: OPS.eoFill, numArgs: 0, variableArgs: false, };
|
||||
t['B'] = { id: OPS.fillStroke, numArgs: 0, variableArgs: false, };
|
||||
t['B*'] = { id: OPS.eoFillStroke, numArgs: 0, variableArgs: false, };
|
||||
t['b'] = { id: OPS.closeFillStroke, numArgs: 0, variableArgs: false, };
|
||||
t['b*'] = { id: OPS.closeEOFillStroke, numArgs: 0, variableArgs: false, };
|
||||
t['n'] = { id: OPS.endPath, numArgs: 0, variableArgs: false, };
|
||||
|
||||
// Clipping
|
||||
t['W'] = { id: OPS.clip, numArgs: 0, variableArgs: false };
|
||||
t['W*'] = { id: OPS.eoClip, numArgs: 0, variableArgs: false };
|
||||
t['W'] = { id: OPS.clip, numArgs: 0, variableArgs: false, };
|
||||
t['W*'] = { id: OPS.eoClip, numArgs: 0, variableArgs: false, };
|
||||
|
||||
// Text
|
||||
t['BT'] = { id: OPS.beginText, numArgs: 0, variableArgs: false };
|
||||
t['ET'] = { id: OPS.endText, numArgs: 0, variableArgs: false };
|
||||
t['Tc'] = { id: OPS.setCharSpacing, numArgs: 1, variableArgs: false };
|
||||
t['Tw'] = { id: OPS.setWordSpacing, numArgs: 1, variableArgs: false };
|
||||
t['Tz'] = { id: OPS.setHScale, numArgs: 1, variableArgs: false };
|
||||
t['TL'] = { id: OPS.setLeading, numArgs: 1, variableArgs: false };
|
||||
t['Tf'] = { id: OPS.setFont, numArgs: 2, variableArgs: false };
|
||||
t['Tr'] = { id: OPS.setTextRenderingMode, numArgs: 1, variableArgs: false };
|
||||
t['Ts'] = { id: OPS.setTextRise, numArgs: 1, variableArgs: false };
|
||||
t['Td'] = { id: OPS.moveText, numArgs: 2, variableArgs: false };
|
||||
t['TD'] = { id: OPS.setLeadingMoveText, numArgs: 2, variableArgs: false };
|
||||
t['Tm'] = { id: OPS.setTextMatrix, numArgs: 6, variableArgs: false };
|
||||
t['T*'] = { id: OPS.nextLine, numArgs: 0, variableArgs: false };
|
||||
t['Tj'] = { id: OPS.showText, numArgs: 1, variableArgs: false };
|
||||
t['TJ'] = { id: OPS.showSpacedText, numArgs: 1, variableArgs: false };
|
||||
t['\''] = { id: OPS.nextLineShowText, numArgs: 1, variableArgs: false };
|
||||
t['BT'] = { id: OPS.beginText, numArgs: 0, variableArgs: false, };
|
||||
t['ET'] = { id: OPS.endText, numArgs: 0, variableArgs: false, };
|
||||
t['Tc'] = { id: OPS.setCharSpacing, numArgs: 1, variableArgs: false, };
|
||||
t['Tw'] = { id: OPS.setWordSpacing, numArgs: 1, variableArgs: false, };
|
||||
t['Tz'] = { id: OPS.setHScale, numArgs: 1, variableArgs: false, };
|
||||
t['TL'] = { id: OPS.setLeading, numArgs: 1, variableArgs: false, };
|
||||
t['Tf'] = { id: OPS.setFont, numArgs: 2, variableArgs: false, };
|
||||
t['Tr'] = { id: OPS.setTextRenderingMode, numArgs: 1,
|
||||
variableArgs: false, };
|
||||
t['Ts'] = { id: OPS.setTextRise, numArgs: 1, variableArgs: false, };
|
||||
t['Td'] = { id: OPS.moveText, numArgs: 2, variableArgs: false, };
|
||||
t['TD'] = { id: OPS.setLeadingMoveText, numArgs: 2, variableArgs: false, };
|
||||
t['Tm'] = { id: OPS.setTextMatrix, numArgs: 6, variableArgs: false, };
|
||||
t['T*'] = { id: OPS.nextLine, numArgs: 0, variableArgs: false, };
|
||||
t['Tj'] = { id: OPS.showText, numArgs: 1, variableArgs: false, };
|
||||
t['TJ'] = { id: OPS.showSpacedText, numArgs: 1, variableArgs: false, };
|
||||
t['\''] = { id: OPS.nextLineShowText, numArgs: 1, variableArgs: false, };
|
||||
t['"'] = { id: OPS.nextLineSetSpacingShowText, numArgs: 3,
|
||||
variableArgs: false };
|
||||
variableArgs: false, };
|
||||
|
||||
// Type3 fonts
|
||||
t['d0'] = { id: OPS.setCharWidth, numArgs: 2, variableArgs: false };
|
||||
t['d0'] = { id: OPS.setCharWidth, numArgs: 2, variableArgs: false, };
|
||||
t['d1'] = { id: OPS.setCharWidthAndBounds, numArgs: 6,
|
||||
variableArgs: false };
|
||||
variableArgs: false, };
|
||||
|
||||
// Color
|
||||
t['CS'] = { id: OPS.setStrokeColorSpace, numArgs: 1, variableArgs: false };
|
||||
t['cs'] = { id: OPS.setFillColorSpace, numArgs: 1, variableArgs: false };
|
||||
t['SC'] = { id: OPS.setStrokeColor, numArgs: 4, variableArgs: true };
|
||||
t['SCN'] = { id: OPS.setStrokeColorN, numArgs: 33, variableArgs: true };
|
||||
t['sc'] = { id: OPS.setFillColor, numArgs: 4, variableArgs: true };
|
||||
t['scn'] = { id: OPS.setFillColorN, numArgs: 33, variableArgs: true };
|
||||
t['G'] = { id: OPS.setStrokeGray, numArgs: 1, variableArgs: false };
|
||||
t['g'] = { id: OPS.setFillGray, numArgs: 1, variableArgs: false };
|
||||
t['RG'] = { id: OPS.setStrokeRGBColor, numArgs: 3, variableArgs: false };
|
||||
t['rg'] = { id: OPS.setFillRGBColor, numArgs: 3, variableArgs: false };
|
||||
t['K'] = { id: OPS.setStrokeCMYKColor, numArgs: 4, variableArgs: false };
|
||||
t['k'] = { id: OPS.setFillCMYKColor, numArgs: 4, variableArgs: false };
|
||||
t['CS'] = { id: OPS.setStrokeColorSpace, numArgs: 1, variableArgs: false, };
|
||||
t['cs'] = { id: OPS.setFillColorSpace, numArgs: 1, variableArgs: false, };
|
||||
t['SC'] = { id: OPS.setStrokeColor, numArgs: 4, variableArgs: true, };
|
||||
t['SCN'] = { id: OPS.setStrokeColorN, numArgs: 33, variableArgs: true, };
|
||||
t['sc'] = { id: OPS.setFillColor, numArgs: 4, variableArgs: true, };
|
||||
t['scn'] = { id: OPS.setFillColorN, numArgs: 33, variableArgs: true, };
|
||||
t['G'] = { id: OPS.setStrokeGray, numArgs: 1, variableArgs: false, };
|
||||
t['g'] = { id: OPS.setFillGray, numArgs: 1, variableArgs: false, };
|
||||
t['RG'] = { id: OPS.setStrokeRGBColor, numArgs: 3, variableArgs: false, };
|
||||
t['rg'] = { id: OPS.setFillRGBColor, numArgs: 3, variableArgs: false, };
|
||||
t['K'] = { id: OPS.setStrokeCMYKColor, numArgs: 4, variableArgs: false, };
|
||||
t['k'] = { id: OPS.setFillCMYKColor, numArgs: 4, variableArgs: false, };
|
||||
|
||||
// Shading
|
||||
t['sh'] = { id: OPS.shadingFill, numArgs: 1, variableArgs: false };
|
||||
t['sh'] = { id: OPS.shadingFill, numArgs: 1, variableArgs: false, };
|
||||
|
||||
// Images
|
||||
t['BI'] = { id: OPS.beginInlineImage, numArgs: 0, variableArgs: false };
|
||||
t['ID'] = { id: OPS.beginImageData, numArgs: 0, variableArgs: false };
|
||||
t['EI'] = { id: OPS.endInlineImage, numArgs: 1, variableArgs: false };
|
||||
t['BI'] = { id: OPS.beginInlineImage, numArgs: 0, variableArgs: false, };
|
||||
t['ID'] = { id: OPS.beginImageData, numArgs: 0, variableArgs: false, };
|
||||
t['EI'] = { id: OPS.endInlineImage, numArgs: 1, variableArgs: false, };
|
||||
|
||||
// XObjects
|
||||
t['Do'] = { id: OPS.paintXObject, numArgs: 1, variableArgs: false };
|
||||
t['MP'] = { id: OPS.markPoint, numArgs: 1, variableArgs: false };
|
||||
t['DP'] = { id: OPS.markPointProps, numArgs: 2, variableArgs: false };
|
||||
t['BMC'] = { id: OPS.beginMarkedContent, numArgs: 1, variableArgs: false };
|
||||
t['Do'] = { id: OPS.paintXObject, numArgs: 1, variableArgs: false, };
|
||||
t['MP'] = { id: OPS.markPoint, numArgs: 1, variableArgs: false, };
|
||||
t['DP'] = { id: OPS.markPointProps, numArgs: 2, variableArgs: false, };
|
||||
t['BMC'] = { id: OPS.beginMarkedContent, numArgs: 1, variableArgs: false, };
|
||||
t['BDC'] = { id: OPS.beginMarkedContentProps, numArgs: 2,
|
||||
variableArgs: false };
|
||||
t['EMC'] = { id: OPS.endMarkedContent, numArgs: 0, variableArgs: false };
|
||||
variableArgs: false, };
|
||||
t['EMC'] = { id: OPS.endMarkedContent, numArgs: 0, variableArgs: false, };
|
||||
|
||||
// Compatibility
|
||||
t['BX'] = { id: OPS.beginCompat, numArgs: 0, variableArgs: false };
|
||||
t['EX'] = { id: OPS.endCompat, numArgs: 0, variableArgs: false };
|
||||
t['BX'] = { id: OPS.beginCompat, numArgs: 0, variableArgs: false, };
|
||||
t['EX'] = { id: OPS.endCompat, numArgs: 0, variableArgs: false, };
|
||||
|
||||
// (reserved partial commands for the lexer)
|
||||
t['BM'] = null;
|
||||
@ -2968,7 +2969,7 @@ var EvaluatorPreprocessor = (function EvaluatorPreprocessorClosure() {
|
||||
this.stateManager.transform(args);
|
||||
break;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
return EvaluatorPreprocessor;
|
||||
})();
|
||||
@ -3062,7 +3063,7 @@ var QueueOptimizer = (function QueueOptimizerClosure() {
|
||||
map.push({
|
||||
transform,
|
||||
x: currentX, y: currentY,
|
||||
w: img.width, h: img.height
|
||||
w: img.width, h: img.height,
|
||||
});
|
||||
currentX += img.width + 2 * IMAGE_PADDING;
|
||||
maxLineHeight = Math.max(maxLineHeight, img.height);
|
||||
@ -3101,7 +3102,7 @@ var QueueOptimizer = (function QueueOptimizerClosure() {
|
||||
fnArray.splice(iFirstSave, count * 4, OPS.paintInlineImageXObjectGroup);
|
||||
argsArray.splice(iFirstSave, count * 4,
|
||||
[{ width: imgWidth, height: imgHeight, kind: ImageKind.RGBA_32BPP,
|
||||
data: imgData }, map]);
|
||||
data: imgData, }, map]);
|
||||
|
||||
return iFirstSave + 1;
|
||||
});
|
||||
@ -3194,7 +3195,7 @@ var QueueOptimizer = (function QueueOptimizerClosure() {
|
||||
var maskParams = argsArray[iFirstPIMXO + (q << 2)][0];
|
||||
images.push({ data: maskParams.data, width: maskParams.width,
|
||||
height: maskParams.height,
|
||||
transform: transformArgs });
|
||||
transform: transformArgs, });
|
||||
}
|
||||
|
||||
// Replace queue items.
|
||||
@ -3372,7 +3373,7 @@ var QueueOptimizer = (function QueueOptimizerClosure() {
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
return QueueOptimizer;
|
||||
})();
|
||||
|
@ -40,7 +40,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
p = start + offset + 14;
|
||||
ranges = [];
|
||||
for (i = 0; i < segCount; i++, p += 2) {
|
||||
ranges[i] = {end: getUshort(data, p)};
|
||||
ranges[i] = { end: getUshort(data, p), };
|
||||
}
|
||||
p += 2;
|
||||
for (i = 0; i < segCount; i++, p += 2) {
|
||||
@ -70,7 +70,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
ranges.push({
|
||||
start: getLong(data, p),
|
||||
end: getLong(data, p + 4),
|
||||
idDelta: getLong(data, p + 8) - getLong(data, p)
|
||||
idDelta: getLong(data, p + 8) - getLong(data, p),
|
||||
});
|
||||
p += 12;
|
||||
}
|
||||
@ -88,7 +88,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
glyphs: cff.charStrings.objects,
|
||||
subrs: (cff.topDict.privateDict && cff.topDict.privateDict.subrsIndex &&
|
||||
cff.topDict.privateDict.subrsIndex.objects),
|
||||
gsubrs: cff.globalSubrIndex && cff.globalSubrIndex.objects
|
||||
gsubrs: cff.globalSubrIndex && cff.globalSubrIndex.objects,
|
||||
};
|
||||
}
|
||||
|
||||
@ -139,13 +139,13 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
|
||||
function compileGlyf(code, cmds, font) {
|
||||
function moveTo(x, y) {
|
||||
cmds.push({cmd: 'moveTo', args: [x, y]});
|
||||
cmds.push({ cmd: 'moveTo', args: [x, y], });
|
||||
}
|
||||
function lineTo(x, y) {
|
||||
cmds.push({cmd: 'lineTo', args: [x, y]});
|
||||
cmds.push({ cmd: 'lineTo', args: [x, y], });
|
||||
}
|
||||
function quadraticCurveTo(xa, ya, x, y) {
|
||||
cmds.push({cmd: 'quadraticCurveTo', args: [xa, ya, x, y]});
|
||||
cmds.push({ cmd: 'quadraticCurveTo', args: [xa, ya, x, y], });
|
||||
}
|
||||
|
||||
var i = 0;
|
||||
@ -191,11 +191,11 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
}
|
||||
var subglyph = font.glyphs[glyphIndex];
|
||||
if (subglyph) {
|
||||
cmds.push({cmd: 'save'});
|
||||
cmds.push({cmd: 'transform',
|
||||
args: [scaleX, scale01, scale10, scaleY, x, y]});
|
||||
cmds.push({ cmd: 'save', });
|
||||
cmds.push({ cmd: 'transform',
|
||||
args: [scaleX, scale01, scale10, scaleY, x, y], });
|
||||
compileGlyf(subglyph, cmds, font);
|
||||
cmds.push({cmd: 'restore'});
|
||||
cmds.push({ cmd: 'restore', });
|
||||
}
|
||||
} while ((flags & 0x20));
|
||||
} else {
|
||||
@ -267,7 +267,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
var p = {
|
||||
flags: 1,
|
||||
x: (contour[0].x + contour[contour.length - 1].x) / 2,
|
||||
y: (contour[0].y + contour[contour.length - 1].y) / 2
|
||||
y: (contour[0].y + contour[contour.length - 1].y) / 2,
|
||||
};
|
||||
contour.unshift(p);
|
||||
contour.push(p);
|
||||
@ -297,13 +297,13 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
var stems = 0;
|
||||
|
||||
function moveTo(x, y) {
|
||||
cmds.push({cmd: 'moveTo', args: [x, y]});
|
||||
cmds.push({ cmd: 'moveTo', args: [x, y], });
|
||||
}
|
||||
function lineTo(x, y) {
|
||||
cmds.push({cmd: 'lineTo', args: [x, y]});
|
||||
cmds.push({ cmd: 'lineTo', args: [x, y], });
|
||||
}
|
||||
function bezierCurveTo(x1, y1, x2, y2, x, y) {
|
||||
cmds.push({cmd: 'bezierCurveTo', args: [x1, y1, x2, y2, x, y]});
|
||||
cmds.push({ cmd: 'bezierCurveTo', args: [x1, y1, x2, y2, x, y], });
|
||||
}
|
||||
|
||||
function parse(code) {
|
||||
@ -432,12 +432,12 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
var bchar = stack.pop();
|
||||
y = stack.pop();
|
||||
x = stack.pop();
|
||||
cmds.push({cmd: 'save'});
|
||||
cmds.push({cmd: 'translate', args: [x, y]});
|
||||
cmds.push({ cmd: 'save', });
|
||||
cmds.push({ cmd: 'translate', args: [x, y], });
|
||||
var cmap = lookupCmap(font.cmap, String.fromCharCode(
|
||||
font.glyphNameMap[StandardEncoding[achar]]));
|
||||
compileCharString(font.glyphs[cmap.glyphId], cmds, font);
|
||||
cmds.push({cmd: 'restore'});
|
||||
cmds.push({ cmd: 'restore', });
|
||||
|
||||
cmap = lookupCmap(font.cmap, String.fromCharCode(
|
||||
font.glyphNameMap[StandardEncoding[bchar]]));
|
||||
@ -616,13 +616,13 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
}
|
||||
|
||||
var cmds = [];
|
||||
cmds.push({cmd: 'save'});
|
||||
cmds.push({cmd: 'transform', args: this.fontMatrix.slice()});
|
||||
cmds.push({cmd: 'scale', args: ['size', '-size']});
|
||||
cmds.push({ cmd: 'save', });
|
||||
cmds.push({ cmd: 'transform', args: this.fontMatrix.slice(), });
|
||||
cmds.push({ cmd: 'scale', args: ['size', '-size'], });
|
||||
|
||||
this.compileGlyphImpl(code, cmds);
|
||||
|
||||
cmds.push({cmd: 'restore'});
|
||||
cmds.push({ cmd: 'restore', });
|
||||
|
||||
return cmds;
|
||||
},
|
||||
@ -635,7 +635,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
var cmap = lookupCmap(this.cmap, unicode);
|
||||
return (this.compiledGlyphs[cmap.glyphId] !== undefined &&
|
||||
this.compiledCharCodeToGlyphId[cmap.charCode] !== undefined);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
function TrueTypeCompiled(glyphs, cmap, fontMatrix) {
|
||||
@ -649,7 +649,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
Util.inherit(TrueTypeCompiled, CompiledFont, {
|
||||
compileGlyphImpl(code, cmds) {
|
||||
compileGlyf(code, cmds, this);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
function Type2Compiled(cffInfo, cmap, fontMatrix, glyphNameMap) {
|
||||
@ -671,7 +671,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
Util.inherit(Type2Compiled, CompiledFont, {
|
||||
compileGlyphImpl(code, cmds) {
|
||||
compileCharString(code, cmds, this);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
@ -711,7 +711,7 @@ var FontRendererFactory = (function FontRendererFactoryClosure() {
|
||||
parseGlyfTable(glyf, loca, indexToLocFormat), cmap, fontMatrix);
|
||||
}
|
||||
return new Type2Compiled(cff, cmap, font.fontMatrix, font.glyphNameMap);
|
||||
}
|
||||
},
|
||||
};
|
||||
})();
|
||||
|
||||
|
@ -60,7 +60,7 @@ var FontFlags = {
|
||||
Italic: 64,
|
||||
AllCap: 65536,
|
||||
SmallCap: 131072,
|
||||
ForceBold: 262144
|
||||
ForceBold: 262144,
|
||||
};
|
||||
|
||||
var MacStandardGlyphOrdering = [
|
||||
@ -347,7 +347,7 @@ var OpenTypeFileBuilder = (function OpenTypeFileBuilderClosure() {
|
||||
return {
|
||||
range: searchRange,
|
||||
entry: log2,
|
||||
rangeShift: entrySize * entriesCount - searchRange
|
||||
rangeShift: entrySize * entriesCount - searchRange,
|
||||
};
|
||||
};
|
||||
|
||||
@ -436,7 +436,7 @@ var OpenTypeFileBuilder = (function OpenTypeFileBuilderClosure() {
|
||||
throw new Error('Table ' + tag + ' already exists');
|
||||
}
|
||||
this.tables[tag] = data;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return OpenTypeFileBuilder;
|
||||
@ -868,7 +868,7 @@ var Font = (function FontClosure() {
|
||||
if (glyphs[charCode] >= numGlyphs) {
|
||||
continue;
|
||||
}
|
||||
codes.push({ fontCharCode: charCode | 0, glyphId: glyphs[charCode] });
|
||||
codes.push({ fontCharCode: charCode | 0, glyphId: glyphs[charCode], });
|
||||
}
|
||||
codes.sort(function fontGetRangesSort(a, b) {
|
||||
return a.fontCharCode - b.fontCharCode;
|
||||
@ -1047,7 +1047,7 @@ var Font = (function FontClosure() {
|
||||
yMax: 0,
|
||||
yMin: 0,
|
||||
ascent: 0,
|
||||
descent: 0
|
||||
descent: 0,
|
||||
};
|
||||
|
||||
var ulUnicodeRange1 = 0;
|
||||
@ -1283,7 +1283,7 @@ var Font = (function FontClosure() {
|
||||
numTables: ttf.getUint16(),
|
||||
searchRange: ttf.getUint16(),
|
||||
entrySelector: ttf.getUint16(),
|
||||
rangeShift: ttf.getUint16()
|
||||
rangeShift: ttf.getUint16(),
|
||||
};
|
||||
}
|
||||
|
||||
@ -1298,7 +1298,7 @@ var Font = (function FontClosure() {
|
||||
platformId: -1,
|
||||
encodingId: -1,
|
||||
mappings: [],
|
||||
hasShortCmap: false
|
||||
hasShortCmap: false,
|
||||
};
|
||||
}
|
||||
var segment;
|
||||
@ -1362,7 +1362,7 @@ var Font = (function FontClosure() {
|
||||
platformId: -1,
|
||||
encodingId: -1,
|
||||
mappings: [],
|
||||
hasShortCmap: false
|
||||
hasShortCmap: false,
|
||||
};
|
||||
}
|
||||
|
||||
@ -1383,7 +1383,7 @@ var Font = (function FontClosure() {
|
||||
}
|
||||
mappings.push({
|
||||
charCode: j,
|
||||
glyphId: index
|
||||
glyphId: index,
|
||||
});
|
||||
}
|
||||
hasShortCmap = true;
|
||||
@ -1394,7 +1394,7 @@ var Font = (function FontClosure() {
|
||||
font.getBytes(6); // skipping range fields
|
||||
var segIndex, segments = [];
|
||||
for (segIndex = 0; segIndex < segCount; segIndex++) {
|
||||
segments.push({ end: font.getUint16() });
|
||||
segments.push({ end: font.getUint16(), });
|
||||
}
|
||||
font.getUint16();
|
||||
for (segIndex = 0; segIndex < segCount; segIndex++) {
|
||||
@ -1470,7 +1470,7 @@ var Font = (function FontClosure() {
|
||||
platformId: -1,
|
||||
encodingId: -1,
|
||||
mappings: [],
|
||||
hasShortCmap: false
|
||||
hasShortCmap: false,
|
||||
};
|
||||
}
|
||||
|
||||
@ -1838,7 +1838,7 @@ var Font = (function FontClosure() {
|
||||
language: font.getUint16(),
|
||||
name: font.getUint16(),
|
||||
length: font.getUint16(),
|
||||
offset: font.getUint16()
|
||||
offset: font.getUint16(),
|
||||
};
|
||||
// using only Macintosh and Windows platform/encoding names
|
||||
if ((r.platform === 1 && r.encoding === 0 && r.language === 0) ||
|
||||
@ -2091,7 +2091,7 @@ var Font = (function FontClosure() {
|
||||
functionsUsed: [],
|
||||
functionsStackDeltas: [],
|
||||
tooComplexToFollowFunctions: false,
|
||||
hintsValid: true
|
||||
hintsValid: true,
|
||||
};
|
||||
if (fpgm) {
|
||||
sanitizeTTProgram(fpgm, ttContext);
|
||||
@ -2254,7 +2254,7 @@ var Font = (function FontClosure() {
|
||||
yMax: int16(tables['head'].data[42], tables['head'].data[43]),
|
||||
yMin: signedInt16(tables['head'].data[38], tables['head'].data[39]),
|
||||
ascent: int16(tables['hhea'].data[4], tables['hhea'].data[5]),
|
||||
descent: signedInt16(tables['hhea'].data[6], tables['hhea'].data[7])
|
||||
descent: signedInt16(tables['hhea'].data[6], tables['hhea'].data[7]),
|
||||
};
|
||||
|
||||
// PDF FontDescriptor metrics lie -- using data from actual font.
|
||||
@ -2435,14 +2435,14 @@ var Font = (function FontClosure() {
|
||||
this.toFontChar = newMapping.toFontChar;
|
||||
tables['cmap'] = {
|
||||
tag: 'cmap',
|
||||
data: createCmapTable(newMapping.charCodeToGlyphId, numGlyphs)
|
||||
data: createCmapTable(newMapping.charCodeToGlyphId, numGlyphs),
|
||||
};
|
||||
|
||||
if (!tables['OS/2'] || !validateOS2Table(tables['OS/2'])) {
|
||||
tables['OS/2'] = {
|
||||
tag: 'OS/2',
|
||||
data: createOS2Table(properties, newMapping.charCodeToGlyphId,
|
||||
metricsOverride)
|
||||
metricsOverride),
|
||||
};
|
||||
}
|
||||
|
||||
@ -2450,7 +2450,7 @@ var Font = (function FontClosure() {
|
||||
if (!tables['post']) {
|
||||
tables['post'] = {
|
||||
tag: 'post',
|
||||
data: createPostTable(properties)
|
||||
data: createPostTable(properties),
|
||||
};
|
||||
}
|
||||
|
||||
@ -2472,7 +2472,7 @@ var Font = (function FontClosure() {
|
||||
if (!tables['name']) {
|
||||
tables['name'] = {
|
||||
tag: 'name',
|
||||
data: createNameTable(this.name)
|
||||
data: createNameTable(this.name),
|
||||
};
|
||||
} else {
|
||||
// ... using existing 'name' table as prototype
|
||||
@ -2543,7 +2543,7 @@ var Font = (function FontClosure() {
|
||||
}
|
||||
var accentOffset = {
|
||||
x: seac[0] * matrix[0] + seac[1] * matrix[2] + matrix[4],
|
||||
y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5]
|
||||
y: seac[0] * matrix[1] + seac[1] * matrix[3] + matrix[5],
|
||||
};
|
||||
|
||||
var charCodes = getCharCodes(mapping, glyphId);
|
||||
@ -2736,7 +2736,7 @@ var Font = (function FontClosure() {
|
||||
fontCharCode = seac.baseFontCharCode;
|
||||
accent = {
|
||||
fontChar: String.fromCharCode(seac.accentFontCharCode),
|
||||
offset: seac.accentOffset
|
||||
offset: seac.accentOffset,
|
||||
};
|
||||
}
|
||||
|
||||
@ -2798,7 +2798,7 @@ var Font = (function FontClosure() {
|
||||
|
||||
// Enter the translated string into the cache
|
||||
return (charsCache[charsCacheKey] = glyphs);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Font;
|
||||
@ -2816,8 +2816,8 @@ var ErrorFont = (function ErrorFontClosure() {
|
||||
return [];
|
||||
},
|
||||
exportData: function ErrorFont_exportData() {
|
||||
return {error: this.error};
|
||||
}
|
||||
return { error: this.error, };
|
||||
},
|
||||
};
|
||||
|
||||
return ErrorFont;
|
||||
@ -3246,7 +3246,7 @@ var Type1Font = (function Type1FontClosure() {
|
||||
|
||||
var compiler = new CFFCompiler(cff);
|
||||
return compiler.compile();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Type1Font;
|
||||
@ -3307,7 +3307,7 @@ var CFFFont = (function CFFFontClosure() {
|
||||
var encoding = cff.encoding ? cff.encoding.encoding : null;
|
||||
charCodeToGlyphId = type1FontGlyphMapping(properties, encoding, charsets);
|
||||
return charCodeToGlyphId;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return CFFFont;
|
||||
|
@ -460,7 +460,7 @@ var PDFFunction = (function PDFFunctionClosure() {
|
||||
}
|
||||
dest.set(output, destOffset);
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
})();
|
||||
|
||||
@ -524,7 +524,7 @@ var PostScriptStack = (function PostScriptStackClosure() {
|
||||
for (i = c, j = r; i < j; i++, j--) {
|
||||
t = stack[i]; stack[i] = stack[j]; stack[j] = t;
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
return PostScriptStack;
|
||||
})();
|
||||
@ -760,7 +760,7 @@ var PostScriptEvaluator = (function PostScriptEvaluatorClosure() {
|
||||
}
|
||||
}
|
||||
return stack.stack;
|
||||
}
|
||||
},
|
||||
};
|
||||
return PostScriptEvaluator;
|
||||
})();
|
||||
@ -881,7 +881,7 @@ var PostScriptCompiler = (function PostScriptCompilerClosure() {
|
||||
},
|
||||
toString() {
|
||||
return this.parts.join('');
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
function buildAddOperation(num1, num2) {
|
||||
@ -1126,7 +1126,7 @@ var PostScriptCompiler = (function PostScriptCompilerClosure() {
|
||||
result.push(out.join(''));
|
||||
});
|
||||
return result.join('\n');
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return PostScriptCompiler;
|
||||
|
@ -476,7 +476,7 @@ var PDFImage = (function PDFImageClosure() {
|
||||
var drawHeight = this.drawHeight;
|
||||
var imgData = { // other fields are filled in below
|
||||
width: drawWidth,
|
||||
height: drawHeight
|
||||
height: drawHeight,
|
||||
};
|
||||
|
||||
var numComps = this.numComps;
|
||||
@ -633,7 +633,7 @@ var PDFImage = (function PDFImageClosure() {
|
||||
this.image.drawHeight = drawHeight || this.height;
|
||||
this.image.forceRGB = !!forceRGB;
|
||||
return this.image.getBytes(length);
|
||||
}
|
||||
},
|
||||
};
|
||||
return PDFImage;
|
||||
})();
|
||||
|
@ -28,7 +28,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
return this[id];
|
||||
}
|
||||
return (this[id] = new Int8Array(1 << 16));
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
function DecodingContext(data, start, end) {
|
||||
@ -45,7 +45,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
get contextCache() {
|
||||
var cache = new ContextCache();
|
||||
return shadow(this, 'contextCache', cache);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
// Annex A. Arithmetic Integer Decoding Procedure
|
||||
@ -113,29 +113,32 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
];
|
||||
|
||||
var CodingTemplates = [
|
||||
[{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: -2, y: -1},
|
||||
{x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: 2, y: -1},
|
||||
{x: -4, y: 0}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}],
|
||||
[{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: 2, y: -2},
|
||||
{x: -2, y: -1}, {x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1},
|
||||
{x: 2, y: -1}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}],
|
||||
[{x: -1, y: -2}, {x: 0, y: -2}, {x: 1, y: -2}, {x: -2, y: -1},
|
||||
{x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: -2, y: 0},
|
||||
{x: -1, y: 0}],
|
||||
[{x: -3, y: -1}, {x: -2, y: -1}, {x: -1, y: -1}, {x: 0, y: -1},
|
||||
{x: 1, y: -1}, {x: -4, y: 0}, {x: -3, y: 0}, {x: -2, y: 0}, {x: -1, y: 0}]
|
||||
[{ x: -1, y: -2, }, { x: 0, y: -2, }, { x: 1, y: -2, }, { x: -2, y: -1, },
|
||||
{ x: -1, y: -1, }, { x: 0, y: -1, }, { x: 1, y: -1, }, { x: 2, y: -1, },
|
||||
{ x: -4, y: 0, }, { x: -3, y: 0, }, { x: -2, y: 0, }, { x: -1, y: 0, }],
|
||||
[{ x: -1, y: -2, }, { x: 0, y: -2, }, { x: 1, y: -2, }, { x: 2, y: -2, },
|
||||
{ x: -2, y: -1, }, { x: -1, y: -1, }, { x: 0, y: -1, }, { x: 1, y: -1, },
|
||||
{ x: 2, y: -1, }, { x: -3, y: 0, }, { x: -2, y: 0, }, { x: -1, y: 0, }],
|
||||
[{ x: -1, y: -2, }, { x: 0, y: -2, }, { x: 1, y: -2, }, { x: -2, y: -1, },
|
||||
{ x: -1, y: -1, }, { x: 0, y: -1, }, { x: 1, y: -1, }, { x: -2, y: 0, },
|
||||
{ x: -1, y: 0, }],
|
||||
[{ x: -3, y: -1, }, { x: -2, y: -1, }, { x: -1, y: -1, }, { x: 0, y: -1, },
|
||||
{ x: 1, y: -1, }, { x: -4, y: 0, }, { x: -3, y: 0, }, { x: -2, y: 0, },
|
||||
{ x: -1, y: 0, }]
|
||||
];
|
||||
|
||||
var RefinementTemplates = [
|
||||
{
|
||||
coding: [{x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}],
|
||||
reference: [{x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}, {x: 0, y: 0},
|
||||
{x: 1, y: 0}, {x: -1, y: 1}, {x: 0, y: 1}, {x: 1, y: 1}]
|
||||
coding: [{ x: 0, y: -1, }, { x: 1, y: -1, }, { x: -1, y: 0, }],
|
||||
reference: [{ x: 0, y: -1, }, { x: 1, y: -1, }, { x: -1, y: 0, },
|
||||
{ x: 0, y: 0, }, { x: 1, y: 0, }, { x: -1, y: 1, },
|
||||
{ x: 0, y: 1, }, { x: 1, y: 1, }],
|
||||
},
|
||||
{
|
||||
coding: [{x: -1, y: -1}, {x: 0, y: -1}, {x: 1, y: -1}, {x: -1, y: 0}],
|
||||
reference: [{x: 0, y: -1}, {x: -1, y: 0}, {x: 0, y: 0}, {x: 1, y: 0},
|
||||
{x: 0, y: 1}, {x: 1, y: 1}]
|
||||
coding: [{ x: -1, y: -1, }, { x: 0, y: -1, }, { x: 1, y: -1, },
|
||||
{ x: -1, y: 0, }],
|
||||
reference: [{ x: 0, y: -1, }, { x: -1, y: 0, }, { x: 0, y: 0, },
|
||||
{ x: 1, y: 0, }, { x: 0, y: 1, }, { x: 1, y: 1, }],
|
||||
}
|
||||
];
|
||||
|
||||
@ -731,7 +734,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
height: readUint32(data, start + 4),
|
||||
x: readUint32(data, start + 8),
|
||||
y: readUint32(data, start + 12),
|
||||
combinationOperator: data[start + 16] & 7
|
||||
combinationOperator: data[start + 16] & 7,
|
||||
};
|
||||
}
|
||||
var RegionSegmentInformationFieldLength = 17;
|
||||
@ -763,7 +766,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
for (i = 0; i < atLength; i++) {
|
||||
at.push({
|
||||
x: readInt8(data, position),
|
||||
y: readInt8(data, position + 1)
|
||||
y: readInt8(data, position + 1),
|
||||
});
|
||||
position += 2;
|
||||
}
|
||||
@ -774,7 +777,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
for (i = 0; i < 2; i++) {
|
||||
at.push({
|
||||
x: readInt8(data, position),
|
||||
y: readInt8(data, position + 1)
|
||||
y: readInt8(data, position + 1),
|
||||
});
|
||||
position += 2;
|
||||
}
|
||||
@ -821,7 +824,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
for (i = 0; i < 2; i++) {
|
||||
at.push({
|
||||
x: readInt8(data, position),
|
||||
y: readInt8(data, position + 1)
|
||||
y: readInt8(data, position + 1),
|
||||
});
|
||||
position += 2;
|
||||
}
|
||||
@ -850,7 +853,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
for (i = 0; i < atLength; i++) {
|
||||
at.push({
|
||||
x: readInt8(data, position),
|
||||
y: readInt8(data, position + 1)
|
||||
y: readInt8(data, position + 1),
|
||||
});
|
||||
position += 2;
|
||||
}
|
||||
@ -863,7 +866,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
width: readUint32(data, position),
|
||||
height: readUint32(data, position + 4),
|
||||
resolutionX: readUint32(data, position + 8),
|
||||
resolutionY: readUint32(data, position + 12)
|
||||
resolutionY: readUint32(data, position + 12),
|
||||
};
|
||||
if (pageInfo.height === 0xFFFFFFFF) {
|
||||
delete pageInfo.height;
|
||||
@ -1070,7 +1073,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
onImmediateLosslessTextRegion:
|
||||
function SimpleSegmentVisitor_onImmediateLosslessTextRegion() {
|
||||
this.onImmediateTextRegion.apply(this, arguments);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
function Jbig2Image() {}
|
||||
@ -1078,7 +1081,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
||||
Jbig2Image.prototype = {
|
||||
parseChunks: function Jbig2Image_parseChunks(chunks) {
|
||||
return parseJbig2Chunks(chunks);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Jbig2Image;
|
||||
|
@ -67,7 +67,7 @@ var JpegImage = (function JpegImageClosure() {
|
||||
while (length > 0 && !codeLengths[length - 1]) {
|
||||
length--;
|
||||
}
|
||||
code.push({children: [], index: 0});
|
||||
code.push({ children: [], index: 0, });
|
||||
var p = code[0], q;
|
||||
for (i = 0; i < length; i++) {
|
||||
for (j = 0; j < codeLengths[i]; j++) {
|
||||
@ -79,7 +79,7 @@ var JpegImage = (function JpegImageClosure() {
|
||||
p.index++;
|
||||
code.push(p);
|
||||
while (code.length <= i) {
|
||||
code.push(q = {children: [], index: 0});
|
||||
code.push(q = { children: [], index: 0, });
|
||||
p.children[p.index] = q.children;
|
||||
p = q;
|
||||
}
|
||||
@ -87,7 +87,7 @@ var JpegImage = (function JpegImageClosure() {
|
||||
}
|
||||
if (i + 1 < length) {
|
||||
// p here points to last code
|
||||
code.push(q = {children: [], index: 0});
|
||||
code.push(q = { children: [], index: 0, });
|
||||
p.children[p.index] = q.children;
|
||||
p = q;
|
||||
}
|
||||
@ -711,14 +711,14 @@ var JpegImage = (function JpegImageClosure() {
|
||||
appData[2] === 0x49 && appData[3] === 0x46 &&
|
||||
appData[4] === 0) { // 'JFIF\x00'
|
||||
jfif = {
|
||||
version: { major: appData[5], minor: appData[6] },
|
||||
version: { major: appData[5], minor: appData[6], },
|
||||
densityUnits: appData[7],
|
||||
xDensity: (appData[8] << 8) | appData[9],
|
||||
yDensity: (appData[10] << 8) | appData[11],
|
||||
thumbWidth: appData[12],
|
||||
thumbHeight: appData[13],
|
||||
thumbData: appData.subarray(14, 14 +
|
||||
3 * appData[12] * appData[13])
|
||||
3 * appData[12] * appData[13]),
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -731,7 +731,7 @@ var JpegImage = (function JpegImageClosure() {
|
||||
version: (appData[5] << 8) | appData[6],
|
||||
flags0: (appData[7] << 8) | appData[8],
|
||||
flags1: (appData[9] << 8) | appData[10],
|
||||
transformCode: appData[11]
|
||||
transformCode: appData[11],
|
||||
};
|
||||
}
|
||||
}
|
||||
@ -891,7 +891,7 @@ var JpegImage = (function JpegImageClosure() {
|
||||
scaleX: component.h / frame.maxH,
|
||||
scaleY: component.v / frame.maxV,
|
||||
blocksPerLine: component.blocksPerLine,
|
||||
blocksPerColumn: component.blocksPerColumn
|
||||
blocksPerColumn: component.blocksPerColumn,
|
||||
});
|
||||
}
|
||||
this.numComponents = this.components.length;
|
||||
@ -1119,7 +1119,7 @@ var JpegImage = (function JpegImageClosure() {
|
||||
}
|
||||
}
|
||||
return data;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return JpegImage;
|
||||
|
@ -24,7 +24,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
'LL': 0,
|
||||
'LH': 1,
|
||||
'HL': 1,
|
||||
'HH': 2
|
||||
'HH': 2,
|
||||
};
|
||||
function JpxImage() {
|
||||
this.failOnCorruptedImage = false;
|
||||
@ -173,7 +173,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
precision: (data[j] & 0x7F) + 1,
|
||||
isSigned: !!(data[j] & 0x80),
|
||||
XRsiz: data[j + 1],
|
||||
YRsiz: data[j + 1]
|
||||
YRsiz: data[j + 1],
|
||||
};
|
||||
calculateComponentDimensions(component, siz);
|
||||
components.push(component);
|
||||
@ -310,7 +310,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
var precinctsSize = data[j++];
|
||||
precinctsSizes.push({
|
||||
PPx: precinctsSize & 0xF,
|
||||
PPy: precinctsSize >> 4
|
||||
PPy: precinctsSize >> 4,
|
||||
});
|
||||
}
|
||||
cod.precinctsSizes = precinctsSizes;
|
||||
@ -399,7 +399,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
this.width = context.SIZ.Xsiz - context.SIZ.XOsiz;
|
||||
this.height = context.SIZ.Ysiz - context.SIZ.YOsiz;
|
||||
this.componentsCount = context.SIZ.Csiz;
|
||||
}
|
||||
},
|
||||
};
|
||||
function calculateComponentDimensions(component, siz) {
|
||||
// Section B.2 Component mapping
|
||||
@ -525,7 +525,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
tbx0: codeblockWidth * i,
|
||||
tby0: codeblockHeight * j,
|
||||
tbx1: codeblockWidth * (i + 1),
|
||||
tby1: codeblockHeight * (j + 1)
|
||||
tby1: codeblockHeight * (j + 1),
|
||||
};
|
||||
|
||||
codeblock.tbx0_ = Math.max(subband.tbx0, codeblock.tbx0);
|
||||
@ -569,7 +569,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
cbxMin: i,
|
||||
cbyMin: j,
|
||||
cbxMax: i,
|
||||
cbyMax: j
|
||||
cbyMax: j,
|
||||
};
|
||||
}
|
||||
codeblock.precinct = precinct;
|
||||
@ -579,7 +579,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
codeblockWidth: xcb_,
|
||||
codeblockHeight: ycb_,
|
||||
numcodeblockwide: cbx1 - cbx0 + 1,
|
||||
numcodeblockhigh: cby1 - cby0 + 1
|
||||
numcodeblockhigh: cby1 - cby0 + 1,
|
||||
};
|
||||
subband.codeblocks = codeblocks;
|
||||
subband.precincts = precincts;
|
||||
@ -602,7 +602,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
}
|
||||
return {
|
||||
layerNumber,
|
||||
codeblocks: precinctCodeblocks
|
||||
codeblocks: precinctCodeblocks,
|
||||
};
|
||||
}
|
||||
function LayerResolutionComponentPositionIterator(context) {
|
||||
@ -885,7 +885,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
resolution.precinctParameters.numprecinctshigh);
|
||||
sizePerResolution[r] = {
|
||||
width: widthCurrentResolution,
|
||||
height: heightCurrentResolution
|
||||
height: heightCurrentResolution,
|
||||
};
|
||||
scale <<= 1;
|
||||
}
|
||||
@ -898,7 +898,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
minWidth: minWidthCurrentComponent,
|
||||
minHeight: minHeightCurrentComponent,
|
||||
maxNumWide: maxNumWideCurrentComponent,
|
||||
maxNumHigh: maxNumHighCurrentComponent
|
||||
maxNumHigh: maxNumHighCurrentComponent,
|
||||
};
|
||||
}
|
||||
return {
|
||||
@ -1168,7 +1168,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
queue.push({
|
||||
codeblock,
|
||||
codingpasses,
|
||||
dataLength: codedDataLength
|
||||
dataLength: codedDataLength,
|
||||
});
|
||||
}
|
||||
alignToByte();
|
||||
@ -1185,7 +1185,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
data,
|
||||
start: offset + position,
|
||||
end: offset + position + packetItem.dataLength,
|
||||
codingpasses: packetItem.codingpasses
|
||||
codingpasses: packetItem.codingpasses,
|
||||
});
|
||||
position += packetItem.dataLength;
|
||||
}
|
||||
@ -1347,7 +1347,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
subbandCoefficients.push({
|
||||
width,
|
||||
height,
|
||||
items: coefficients
|
||||
items: coefficients,
|
||||
});
|
||||
}
|
||||
|
||||
@ -1358,7 +1358,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
top: component.tcy0,
|
||||
width: result.width,
|
||||
height: result.height,
|
||||
items: result.items
|
||||
items: result.items,
|
||||
};
|
||||
}
|
||||
function transformComponents(context) {
|
||||
@ -1380,7 +1380,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
top: tile0.top,
|
||||
width: tile0.width,
|
||||
height: tile0.height,
|
||||
items: out
|
||||
items: out,
|
||||
};
|
||||
|
||||
// Section G.2.2 Inverse multi component transform
|
||||
@ -1482,7 +1482,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
var level = {
|
||||
width,
|
||||
height,
|
||||
items: []
|
||||
items: [],
|
||||
};
|
||||
this.levels.push(level);
|
||||
width = Math.ceil(width / 2);
|
||||
@ -1528,7 +1528,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
level = this.levels[currentLevel];
|
||||
level.items[level.index] = value;
|
||||
return true;
|
||||
}
|
||||
},
|
||||
};
|
||||
return TagTree;
|
||||
})();
|
||||
@ -1609,7 +1609,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
level = this.levels[currentLevel];
|
||||
level.items[level.index] = value;
|
||||
return true;
|
||||
}
|
||||
},
|
||||
};
|
||||
return InclusionTree;
|
||||
})();
|
||||
@ -1953,7 +1953,7 @@ var JpxImage = (function JpxImageClosure() {
|
||||
if (symbol !== 0xA) {
|
||||
error('JPX Error: Invalid segmentation symbol');
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return BitModel;
|
||||
|
@ -134,7 +134,7 @@ var MurmurHash3_64 = (function MurmurHash3_64Closure(seed) {
|
||||
}
|
||||
|
||||
return str;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return MurmurHash3_64;
|
||||
|
@ -265,7 +265,7 @@ NetworkManager.prototype = {
|
||||
var xhr = this.pendingRequests[xhrId].xhr;
|
||||
delete this.pendingRequests[xhrId];
|
||||
xhr.abort();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/** @implements {IPDFStream} */
|
||||
@ -274,7 +274,7 @@ function PDFNetworkStream(options) {
|
||||
var source = options.source;
|
||||
this._manager = new NetworkManager(source.url, {
|
||||
httpHeaders: source.httpHeaders,
|
||||
withCredentials: source.withCredentials
|
||||
withCredentials: source.withCredentials,
|
||||
});
|
||||
this._rangeChunkSize = source.rangeChunkSize;
|
||||
this._fullRequestReader = null;
|
||||
@ -313,7 +313,7 @@ PDFNetworkStream.prototype = {
|
||||
readers.forEach(function (reader) {
|
||||
reader.cancel(reason);
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/** @implements {IPDFStreamReader} */
|
||||
@ -327,7 +327,7 @@ function PDFNetworkStreamFullRequestReader(manager, options) {
|
||||
this._onProgressiveData.bind(this),
|
||||
onDone: this._onDone.bind(this),
|
||||
onError: this._onError.bind(this),
|
||||
onProgress: this._onProgress.bind(this)
|
||||
onProgress: this._onProgress.bind(this),
|
||||
};
|
||||
this._url = source.url;
|
||||
this._fullRequestId = manager.requestFull(args);
|
||||
@ -421,7 +421,7 @@ PDFNetworkStreamFullRequestReader.prototype = {
|
||||
function PDFNetworkStreamFullRequestReader_onProgressiveData(chunk) {
|
||||
if (this._requests.length > 0) {
|
||||
var requestCapability = this._requests.shift();
|
||||
requestCapability.resolve({value: chunk, done: false});
|
||||
requestCapability.resolve({ value: chunk, done: false, });
|
||||
} else {
|
||||
this._cachedChunks.push(chunk);
|
||||
}
|
||||
@ -436,7 +436,7 @@ PDFNetworkStreamFullRequestReader.prototype = {
|
||||
return;
|
||||
}
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({value: undefined, done: true});
|
||||
requestCapability.resolve({ value: undefined, done: true, });
|
||||
});
|
||||
this._requests = [];
|
||||
},
|
||||
@ -464,7 +464,7 @@ PDFNetworkStreamFullRequestReader.prototype = {
|
||||
if (this.onProgress) {
|
||||
this.onProgress({
|
||||
loaded: data.loaded,
|
||||
total: data.lengthComputable ? data.total : this._contentLength
|
||||
total: data.lengthComputable ? data.total : this._contentLength,
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -494,7 +494,7 @@ PDFNetworkStreamFullRequestReader.prototype = {
|
||||
return Promise.resolve(chunk);
|
||||
}
|
||||
if (this._done) {
|
||||
return Promise.resolve({value: undefined, done: true});
|
||||
return Promise.resolve({ value: undefined, done: true, });
|
||||
}
|
||||
var requestCapability = createPromiseCapability();
|
||||
this._requests.push(requestCapability);
|
||||
@ -505,14 +505,14 @@ PDFNetworkStreamFullRequestReader.prototype = {
|
||||
this._done = true;
|
||||
this._headersReceivedCapability.reject(reason);
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({value: undefined, done: true});
|
||||
requestCapability.resolve({ value: undefined, done: true, });
|
||||
});
|
||||
this._requests = [];
|
||||
if (this._manager.isPendingRequest(this._fullRequestId)) {
|
||||
this._manager.abortRequest(this._fullRequestId);
|
||||
}
|
||||
this._fullRequestReader = null;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/** @implements {IPDFStreamRangeReader} */
|
||||
@ -520,7 +520,7 @@ function PDFNetworkStreamRangeRequestReader(manager, begin, end) {
|
||||
this._manager = manager;
|
||||
var args = {
|
||||
onDone: this._onDone.bind(this),
|
||||
onProgress: this._onProgress.bind(this)
|
||||
onProgress: this._onProgress.bind(this),
|
||||
};
|
||||
this._requestId = manager.requestRange(begin, end, args);
|
||||
this._requests = [];
|
||||
@ -542,13 +542,13 @@ PDFNetworkStreamRangeRequestReader.prototype = {
|
||||
var chunk = data.chunk;
|
||||
if (this._requests.length > 0) {
|
||||
var requestCapability = this._requests.shift();
|
||||
requestCapability.resolve({value: chunk, done: false});
|
||||
requestCapability.resolve({ value: chunk, done: false, });
|
||||
} else {
|
||||
this._queuedChunk = chunk;
|
||||
}
|
||||
this._done = true;
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({value: undefined, done: true});
|
||||
requestCapability.resolve({ value: undefined, done: true, });
|
||||
});
|
||||
this._requests = [];
|
||||
this._close();
|
||||
@ -557,7 +557,7 @@ PDFNetworkStreamRangeRequestReader.prototype = {
|
||||
_onProgress: function PDFNetworkStreamRangeRequestReader_onProgress(evt) {
|
||||
if (!this.isStreamingSupported && this.onProgress) {
|
||||
this.onProgress({
|
||||
loaded: evt.loaded
|
||||
loaded: evt.loaded,
|
||||
});
|
||||
}
|
||||
},
|
||||
@ -570,10 +570,10 @@ PDFNetworkStreamRangeRequestReader.prototype = {
|
||||
if (this._queuedChunk !== null) {
|
||||
var chunk = this._queuedChunk;
|
||||
this._queuedChunk = null;
|
||||
return Promise.resolve({value: chunk, done: false});
|
||||
return Promise.resolve({ value: chunk, done: false, });
|
||||
}
|
||||
if (this._done) {
|
||||
return Promise.resolve({value: undefined, done: true});
|
||||
return Promise.resolve({ value: undefined, done: true, });
|
||||
}
|
||||
var requestCapability = createPromiseCapability();
|
||||
this._requests.push(requestCapability);
|
||||
@ -583,14 +583,14 @@ PDFNetworkStreamRangeRequestReader.prototype = {
|
||||
cancel: function PDFNetworkStreamRangeRequestReader_cancel(reason) {
|
||||
this._done = true;
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({value: undefined, done: true});
|
||||
requestCapability.resolve({ value: undefined, done: true, });
|
||||
});
|
||||
this._requests = [];
|
||||
if (this._manager.isPendingRequest(this._requestId)) {
|
||||
this._manager.abortRequest(this._requestId);
|
||||
}
|
||||
this._close();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
setPDFNetworkStreamClass(PDFNetworkStream);
|
||||
|
@ -105,7 +105,7 @@ var Catalog = (function CatalogClosure() {
|
||||
if (!isRef(obj)) {
|
||||
return null;
|
||||
}
|
||||
var root = { items: [] };
|
||||
var root = { items: [], };
|
||||
var queue = [{ obj, parent: root, }];
|
||||
// To avoid recursion, keep track of the already processed items.
|
||||
var processed = new RefSet();
|
||||
@ -145,7 +145,7 @@ var Catalog = (function CatalogClosure() {
|
||||
count: outlineDict.get('Count'),
|
||||
bold: !!(flags & 2),
|
||||
italic: !!(flags & 1),
|
||||
items: []
|
||||
items: [],
|
||||
};
|
||||
i.parent.items.push(outlineItem);
|
||||
obj = outlineDict.getRaw('First');
|
||||
@ -556,7 +556,7 @@ var Catalog = (function CatalogClosure() {
|
||||
}
|
||||
|
||||
return next(pageRef);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/**
|
||||
@ -739,7 +739,7 @@ var XRef = (function XRefClosure() {
|
||||
this.cache = [];
|
||||
this.stats = {
|
||||
streamTypes: [],
|
||||
fontTypes: []
|
||||
fontTypes: [],
|
||||
};
|
||||
}
|
||||
|
||||
@ -787,7 +787,7 @@ var XRef = (function XRefClosure() {
|
||||
entryNum: 0,
|
||||
streamPos: parser.lexer.stream.pos,
|
||||
parserBuf1: parser.buf1,
|
||||
parserBuf2: parser.buf2
|
||||
parserBuf2: parser.buf2,
|
||||
};
|
||||
}
|
||||
|
||||
@ -919,7 +919,7 @@ var XRef = (function XRefClosure() {
|
||||
entryRanges: range,
|
||||
byteWidths,
|
||||
entryNum: 0,
|
||||
streamPos: stream.pos
|
||||
streamPos: stream.pos,
|
||||
};
|
||||
}
|
||||
this.readXRefStream(stream);
|
||||
@ -1071,7 +1071,7 @@ var XRef = (function XRefClosure() {
|
||||
this.entries[m[1]] = {
|
||||
offset: position - stream.start,
|
||||
gen: m[2] | 0,
|
||||
uncompressed: true
|
||||
uncompressed: true,
|
||||
};
|
||||
}
|
||||
var contentLength = skipUntil(buffer, position, endobjBytes) + 7;
|
||||
@ -1369,7 +1369,7 @@ var XRef = (function XRefClosure() {
|
||||
|
||||
getCatalogObj: function XRef_getCatalogObj() {
|
||||
return this.root;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return XRef;
|
||||
@ -1490,7 +1490,7 @@ var NameOrNumberTree = (function NameOrNumberTreeClosure() {
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
};
|
||||
return NameOrNumberTree;
|
||||
})();
|
||||
@ -1602,9 +1602,9 @@ var FileSpec = (function FileSpecClosure() {
|
||||
get serializable() {
|
||||
return {
|
||||
filename: this.filename,
|
||||
content: this.content
|
||||
content: this.content,
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
return FileSpec;
|
||||
})();
|
||||
@ -1702,7 +1702,7 @@ var ObjectLoader = (function() {
|
||||
throw e;
|
||||
}
|
||||
nodesToRevisit.push(currentNode);
|
||||
pendingRequests.push({ begin: e.begin, end: e.end });
|
||||
pendingRequests.push({ begin: e.begin, end: e.end, });
|
||||
}
|
||||
}
|
||||
if (currentNode && currentNode.getBaseStreams) {
|
||||
@ -1714,7 +1714,7 @@ var ObjectLoader = (function() {
|
||||
foundMissingData = true;
|
||||
pendingRequests.push({
|
||||
begin: stream.start,
|
||||
end: stream.end
|
||||
end: stream.end,
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -1744,7 +1744,7 @@ var ObjectLoader = (function() {
|
||||
// Everything is loaded.
|
||||
this.refSet = null;
|
||||
this.capability.resolve();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return ObjectLoader;
|
||||
|
@ -599,7 +599,7 @@ var Parser = (function ParserClosure() {
|
||||
warn('Invalid stream: \"' + ex + '\"');
|
||||
return new NullStream(stream);
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Parser;
|
||||
@ -1036,7 +1036,7 @@ var Lexer = (function LexerClosure() {
|
||||
}
|
||||
ch = this.nextChar();
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Lexer;
|
||||
@ -1086,9 +1086,9 @@ var Linearization = {
|
||||
endFirst: getInt('E'),
|
||||
numPages: getInt('N'),
|
||||
mainXRefEntriesOffset: getInt('T'),
|
||||
pageFirst: (linDict.has('P') ? getInt('P', true) : 0)
|
||||
pageFirst: (linDict.has('P') ? getInt('P', true) : 0),
|
||||
};
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
export {
|
||||
|
@ -28,7 +28,7 @@ var ShadingType = {
|
||||
FREE_FORM_MESH: 4,
|
||||
LATTICE_FORM_MESH: 5,
|
||||
COONS_PATCH_MESH: 6,
|
||||
TENSOR_PATCH_MESH: 7
|
||||
TENSOR_PATCH_MESH: 7,
|
||||
};
|
||||
|
||||
var Pattern = (function PatternClosure() {
|
||||
@ -42,7 +42,7 @@ var Pattern = (function PatternClosure() {
|
||||
// Output: the appropriate fillStyle or strokeStyle
|
||||
getPattern: function Pattern_getPattern(ctx) {
|
||||
error('Should not call Pattern.getStyle: ' + ctx);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Pattern.parseShading = function Pattern_parseShading(shading, matrix, xref,
|
||||
@ -70,7 +70,7 @@ var Pattern = (function PatternClosure() {
|
||||
throw ex;
|
||||
}
|
||||
handler.send('UnsupportedFeature',
|
||||
{featureId: UNSUPPORTED_FEATURES.shadingPattern});
|
||||
{ featureId: UNSUPPORTED_FEATURES.shadingPattern, });
|
||||
warn(ex);
|
||||
return new Shadings.Dummy();
|
||||
}
|
||||
@ -213,7 +213,7 @@ Shadings.RadialAxial = (function RadialAxialClosure() {
|
||||
}
|
||||
|
||||
return ['RadialAxial', type, this.colorStops, p0, p1, r0, r1];
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return RadialAxial;
|
||||
@ -313,7 +313,7 @@ Shadings.Mesh = (function MeshClosure() {
|
||||
this.context.colorFn(components, 0, color, 0);
|
||||
}
|
||||
return this.context.colorSpace.getRgb(color, 0);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
function decodeType4Shading(mesh, reader) {
|
||||
@ -589,7 +589,7 @@ Shadings.Mesh = (function MeshClosure() {
|
||||
mesh.figures.push({
|
||||
type: 'patch',
|
||||
coords: new Int32Array(ps), // making copies of ps and cs
|
||||
colors: new Int32Array(cs)
|
||||
colors: new Int32Array(cs),
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -654,7 +654,7 @@ Shadings.Mesh = (function MeshClosure() {
|
||||
mesh.figures.push({
|
||||
type: 'patch',
|
||||
coords: new Int32Array(ps), // making copies of ps and cs
|
||||
colors: new Int32Array(cs)
|
||||
colors: new Int32Array(cs),
|
||||
});
|
||||
}
|
||||
}
|
||||
@ -731,7 +731,7 @@ Shadings.Mesh = (function MeshClosure() {
|
||||
decode: dict.getArray('Decode'),
|
||||
colorFn: fn,
|
||||
colorSpace: cs,
|
||||
numComps: fn ? 1 : cs.numComps
|
||||
numComps: fn ? 1 : cs.numComps,
|
||||
};
|
||||
var reader = new MeshStreamReader(stream, decodeContext);
|
||||
|
||||
@ -775,7 +775,7 @@ Shadings.Mesh = (function MeshClosure() {
|
||||
getIR: function Mesh_getIR() {
|
||||
return ['Mesh', this.shadingType, this.coords, this.colors, this.figures,
|
||||
this.bounds, this.matrix, this.bbox, this.background];
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Mesh;
|
||||
@ -789,7 +789,7 @@ Shadings.Dummy = (function DummyClosure() {
|
||||
Dummy.prototype = {
|
||||
getIR: function Dummy_getIR() {
|
||||
return ['Dummy'];
|
||||
}
|
||||
},
|
||||
};
|
||||
return Dummy;
|
||||
})();
|
||||
|
@ -94,7 +94,7 @@ var BasePdfManager = (function BasePdfManagerClosure() {
|
||||
|
||||
terminate: function BasePdfManager_terminate() {
|
||||
return new NotImplementedException();
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return BasePdfManager;
|
||||
@ -145,7 +145,7 @@ var LocalPdfManager = (function LocalPdfManagerClosure() {
|
||||
|
||||
terminate: function LocalPdfManager_terminate() {
|
||||
return;
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return LocalPdfManager;
|
||||
@ -165,7 +165,7 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
|
||||
url: args.url,
|
||||
length: args.length,
|
||||
disableAutoFetch: args.disableAutoFetch,
|
||||
rangeChunkSize: args.rangeChunkSize
|
||||
rangeChunkSize: args.rangeChunkSize,
|
||||
};
|
||||
this.streamManager = new ChunkedStreamManager(pdfNetworkStream, params);
|
||||
this.pdfDocument = new PDFDocument(this, this.streamManager.getStream());
|
||||
@ -219,7 +219,7 @@ var NetworkPdfManager = (function NetworkPdfManagerClosure() {
|
||||
|
||||
terminate: function NetworkPdfManager_terminate() {
|
||||
this.streamManager.abort();
|
||||
}
|
||||
},
|
||||
});
|
||||
|
||||
return NetworkPdfManager;
|
||||
|
@ -151,7 +151,7 @@ var Dict = (function DictClosure() {
|
||||
for (var key in this.map) {
|
||||
callback(key, this.get(key));
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Dict.empty = new Dict(null);
|
||||
@ -192,7 +192,7 @@ var Ref = (function RefClosure() {
|
||||
str += this.gen;
|
||||
}
|
||||
return str;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Ref;
|
||||
@ -216,7 +216,7 @@ var RefSet = (function RefSetClosure() {
|
||||
|
||||
remove: function RefSet_remove(ref) {
|
||||
delete this.dict[ref.toString()];
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return RefSet;
|
||||
@ -252,7 +252,7 @@ var RefSetCache = (function RefSetCacheClosure() {
|
||||
|
||||
clear: function RefSetCache_clear() {
|
||||
this.dict = Object.create(null);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return RefSetCache;
|
||||
|
@ -91,7 +91,7 @@ var PostScriptParser = (function PostScriptParserClosure() {
|
||||
} else {
|
||||
error('PS Function: error parsing conditional.');
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
return PostScriptParser;
|
||||
})();
|
||||
@ -102,7 +102,7 @@ var PostScriptTokenTypes = {
|
||||
NUMBER: 2,
|
||||
OPERATOR: 3,
|
||||
IF: 4,
|
||||
IFELSE: 5
|
||||
IFELSE: 5,
|
||||
};
|
||||
|
||||
var PostScriptToken = (function PostScriptTokenClosure() {
|
||||
@ -214,7 +214,7 @@ var PostScriptLexer = (function PostScriptLexerClosure() {
|
||||
error('Invalid floating point number: ' + value);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
},
|
||||
};
|
||||
return PostScriptLexer;
|
||||
})();
|
||||
|
@ -245,7 +245,7 @@ var DecodeStream = (function DecodeStreamClosure() {
|
||||
return this.str.getBaseStreams();
|
||||
}
|
||||
return [];
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return DecodeStream;
|
||||
@ -892,7 +892,7 @@ var JpegStream = (function JpegStreamClosure() {
|
||||
// If this.maybeLength is null, we'll get the entire stream.
|
||||
return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
|
||||
},
|
||||
configurable: true
|
||||
configurable: true,
|
||||
});
|
||||
|
||||
JpegStream.prototype.ensureBuffer = function JpegStream_ensureBuffer(req) {
|
||||
@ -969,7 +969,7 @@ var JpxStream = (function JpxStreamClosure() {
|
||||
// If this.maybeLength is null, we'll get the entire stream.
|
||||
return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
|
||||
},
|
||||
configurable: true
|
||||
configurable: true,
|
||||
});
|
||||
|
||||
JpxStream.prototype.ensureBuffer = function JpxStream_ensureBuffer(req) {
|
||||
@ -1039,7 +1039,7 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
|
||||
// If this.maybeLength is null, we'll get the entire stream.
|
||||
return shadow(this, 'bytes', this.stream.getBytes(this.maybeLength));
|
||||
},
|
||||
configurable: true
|
||||
configurable: true,
|
||||
});
|
||||
|
||||
Jbig2Stream.prototype.ensureBuffer = function Jbig2Stream_ensureBuffer(req) {
|
||||
@ -1054,10 +1054,10 @@ var Jbig2Stream = (function Jbig2StreamClosure() {
|
||||
var globalsStream = this.params.get('JBIG2Globals');
|
||||
if (isStream(globalsStream)) {
|
||||
var globals = globalsStream.getBytes();
|
||||
chunks.push({data: globals, start: 0, end: globals.length});
|
||||
chunks.push({ data: globals, start: 0, end: globals.length, });
|
||||
}
|
||||
}
|
||||
chunks.push({data: this.bytes, start: 0, end: this.bytes.length});
|
||||
chunks.push({ data: this.bytes, start: 0, end: this.bytes.length, });
|
||||
var data = jbig2Image.parseChunks(chunks);
|
||||
var dataLength = data.length;
|
||||
|
||||
@ -2326,7 +2326,7 @@ var LZWStream = (function LZWStreamClosure() {
|
||||
dictionaryLengths: new Uint16Array(maxLzwDictionarySize),
|
||||
dictionaryPrevCodes: new Uint16Array(maxLzwDictionarySize),
|
||||
currentSequence: new Uint8Array(maxLzwDictionarySize),
|
||||
currentSequenceLength: 0
|
||||
currentSequenceLength: 0,
|
||||
};
|
||||
for (var i = 0; i < 256; ++i) {
|
||||
lzwState.dictionaryValues[i] = i;
|
||||
|
@ -75,7 +75,7 @@ var Type1CharString = (function Type1CharStringClosure() {
|
||||
'rmoveto': [21],
|
||||
'hmoveto': [22],
|
||||
'vhcurveto': [30],
|
||||
'hvcurveto': [31]
|
||||
'hvcurveto': [31],
|
||||
};
|
||||
|
||||
function Type1CharString() {
|
||||
@ -342,7 +342,7 @@ var Type1CharString = (function Type1CharStringClosure() {
|
||||
this.stack.length = 0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Type1CharString;
|
||||
@ -517,8 +517,8 @@ var Type1Parser = (function Type1ParserClosure() {
|
||||
subrs: [],
|
||||
charstrings: [],
|
||||
properties: {
|
||||
'privateData': privateData
|
||||
}
|
||||
'privateData': privateData,
|
||||
},
|
||||
};
|
||||
var token, length, data, lenIV, encoded;
|
||||
while ((token = this.getToken()) !== null) {
|
||||
@ -635,7 +635,7 @@ var Type1Parser = (function Type1ParserClosure() {
|
||||
charstring: output,
|
||||
width: charString.width,
|
||||
lsb: charString.lsb,
|
||||
seac: charString.seac
|
||||
seac: charString.seac,
|
||||
});
|
||||
}
|
||||
|
||||
@ -695,7 +695,7 @@ var Type1Parser = (function Type1ParserClosure() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return Type1Parser;
|
||||
|
@ -86,129 +86,129 @@ function getUnicodeForGlyph(name, glyphsUnicodeMap) {
|
||||
}
|
||||
|
||||
var UnicodeRanges = [
|
||||
{ 'begin': 0x0000, 'end': 0x007F }, // Basic Latin
|
||||
{ 'begin': 0x0080, 'end': 0x00FF }, // Latin-1 Supplement
|
||||
{ 'begin': 0x0100, 'end': 0x017F }, // Latin Extended-A
|
||||
{ 'begin': 0x0180, 'end': 0x024F }, // Latin Extended-B
|
||||
{ 'begin': 0x0250, 'end': 0x02AF }, // IPA Extensions
|
||||
{ 'begin': 0x02B0, 'end': 0x02FF }, // Spacing Modifier Letters
|
||||
{ 'begin': 0x0300, 'end': 0x036F }, // Combining Diacritical Marks
|
||||
{ 'begin': 0x0370, 'end': 0x03FF }, // Greek and Coptic
|
||||
{ 'begin': 0x2C80, 'end': 0x2CFF }, // Coptic
|
||||
{ 'begin': 0x0400, 'end': 0x04FF }, // Cyrillic
|
||||
{ 'begin': 0x0530, 'end': 0x058F }, // Armenian
|
||||
{ 'begin': 0x0590, 'end': 0x05FF }, // Hebrew
|
||||
{ 'begin': 0xA500, 'end': 0xA63F }, // Vai
|
||||
{ 'begin': 0x0600, 'end': 0x06FF }, // Arabic
|
||||
{ 'begin': 0x07C0, 'end': 0x07FF }, // NKo
|
||||
{ 'begin': 0x0900, 'end': 0x097F }, // Devanagari
|
||||
{ 'begin': 0x0980, 'end': 0x09FF }, // Bengali
|
||||
{ 'begin': 0x0A00, 'end': 0x0A7F }, // Gurmukhi
|
||||
{ 'begin': 0x0A80, 'end': 0x0AFF }, // Gujarati
|
||||
{ 'begin': 0x0B00, 'end': 0x0B7F }, // Oriya
|
||||
{ 'begin': 0x0B80, 'end': 0x0BFF }, // Tamil
|
||||
{ 'begin': 0x0C00, 'end': 0x0C7F }, // Telugu
|
||||
{ 'begin': 0x0C80, 'end': 0x0CFF }, // Kannada
|
||||
{ 'begin': 0x0D00, 'end': 0x0D7F }, // Malayalam
|
||||
{ 'begin': 0x0E00, 'end': 0x0E7F }, // Thai
|
||||
{ 'begin': 0x0E80, 'end': 0x0EFF }, // Lao
|
||||
{ 'begin': 0x10A0, 'end': 0x10FF }, // Georgian
|
||||
{ 'begin': 0x1B00, 'end': 0x1B7F }, // Balinese
|
||||
{ 'begin': 0x1100, 'end': 0x11FF }, // Hangul Jamo
|
||||
{ 'begin': 0x1E00, 'end': 0x1EFF }, // Latin Extended Additional
|
||||
{ 'begin': 0x1F00, 'end': 0x1FFF }, // Greek Extended
|
||||
{ 'begin': 0x2000, 'end': 0x206F }, // General Punctuation
|
||||
{ 'begin': 0x2070, 'end': 0x209F }, // Superscripts And Subscripts
|
||||
{ 'begin': 0x20A0, 'end': 0x20CF }, // Currency Symbol
|
||||
{ 'begin': 0x20D0, 'end': 0x20FF }, // Combining Diacritical Marks
|
||||
{ 'begin': 0x2100, 'end': 0x214F }, // Letterlike Symbols
|
||||
{ 'begin': 0x2150, 'end': 0x218F }, // Number Forms
|
||||
{ 'begin': 0x2190, 'end': 0x21FF }, // Arrows
|
||||
{ 'begin': 0x2200, 'end': 0x22FF }, // Mathematical Operators
|
||||
{ 'begin': 0x2300, 'end': 0x23FF }, // Miscellaneous Technical
|
||||
{ 'begin': 0x2400, 'end': 0x243F }, // Control Pictures
|
||||
{ 'begin': 0x2440, 'end': 0x245F }, // Optical Character Recognition
|
||||
{ 'begin': 0x2460, 'end': 0x24FF }, // Enclosed Alphanumerics
|
||||
{ 'begin': 0x2500, 'end': 0x257F }, // Box Drawing
|
||||
{ 'begin': 0x2580, 'end': 0x259F }, // Block Elements
|
||||
{ 'begin': 0x25A0, 'end': 0x25FF }, // Geometric Shapes
|
||||
{ 'begin': 0x2600, 'end': 0x26FF }, // Miscellaneous Symbols
|
||||
{ 'begin': 0x2700, 'end': 0x27BF }, // Dingbats
|
||||
{ 'begin': 0x3000, 'end': 0x303F }, // CJK Symbols And Punctuation
|
||||
{ 'begin': 0x3040, 'end': 0x309F }, // Hiragana
|
||||
{ 'begin': 0x30A0, 'end': 0x30FF }, // Katakana
|
||||
{ 'begin': 0x3100, 'end': 0x312F }, // Bopomofo
|
||||
{ 'begin': 0x3130, 'end': 0x318F }, // Hangul Compatibility Jamo
|
||||
{ 'begin': 0xA840, 'end': 0xA87F }, // Phags-pa
|
||||
{ 'begin': 0x3200, 'end': 0x32FF }, // Enclosed CJK Letters And Months
|
||||
{ 'begin': 0x3300, 'end': 0x33FF }, // CJK Compatibility
|
||||
{ 'begin': 0xAC00, 'end': 0xD7AF }, // Hangul Syllables
|
||||
{ 'begin': 0xD800, 'end': 0xDFFF }, // Non-Plane 0 *
|
||||
{ 'begin': 0x10900, 'end': 0x1091F }, // Phoenicia
|
||||
{ 'begin': 0x4E00, 'end': 0x9FFF }, // CJK Unified Ideographs
|
||||
{ 'begin': 0xE000, 'end': 0xF8FF }, // Private Use Area (plane 0)
|
||||
{ 'begin': 0x31C0, 'end': 0x31EF }, // CJK Strokes
|
||||
{ 'begin': 0xFB00, 'end': 0xFB4F }, // Alphabetic Presentation Forms
|
||||
{ 'begin': 0xFB50, 'end': 0xFDFF }, // Arabic Presentation Forms-A
|
||||
{ 'begin': 0xFE20, 'end': 0xFE2F }, // Combining Half Marks
|
||||
{ 'begin': 0xFE10, 'end': 0xFE1F }, // Vertical Forms
|
||||
{ 'begin': 0xFE50, 'end': 0xFE6F }, // Small Form Variants
|
||||
{ 'begin': 0xFE70, 'end': 0xFEFF }, // Arabic Presentation Forms-B
|
||||
{ 'begin': 0xFF00, 'end': 0xFFEF }, // Halfwidth And Fullwidth Forms
|
||||
{ 'begin': 0xFFF0, 'end': 0xFFFF }, // Specials
|
||||
{ 'begin': 0x0F00, 'end': 0x0FFF }, // Tibetan
|
||||
{ 'begin': 0x0700, 'end': 0x074F }, // Syriac
|
||||
{ 'begin': 0x0780, 'end': 0x07BF }, // Thaana
|
||||
{ 'begin': 0x0D80, 'end': 0x0DFF }, // Sinhala
|
||||
{ 'begin': 0x1000, 'end': 0x109F }, // Myanmar
|
||||
{ 'begin': 0x1200, 'end': 0x137F }, // Ethiopic
|
||||
{ 'begin': 0x13A0, 'end': 0x13FF }, // Cherokee
|
||||
{ 'begin': 0x1400, 'end': 0x167F }, // Unified Canadian Aboriginal Syllabics
|
||||
{ 'begin': 0x1680, 'end': 0x169F }, // Ogham
|
||||
{ 'begin': 0x16A0, 'end': 0x16FF }, // Runic
|
||||
{ 'begin': 0x1780, 'end': 0x17FF }, // Khmer
|
||||
{ 'begin': 0x1800, 'end': 0x18AF }, // Mongolian
|
||||
{ 'begin': 0x2800, 'end': 0x28FF }, // Braille Patterns
|
||||
{ 'begin': 0xA000, 'end': 0xA48F }, // Yi Syllables
|
||||
{ 'begin': 0x1700, 'end': 0x171F }, // Tagalog
|
||||
{ 'begin': 0x10300, 'end': 0x1032F }, // Old Italic
|
||||
{ 'begin': 0x10330, 'end': 0x1034F }, // Gothic
|
||||
{ 'begin': 0x10400, 'end': 0x1044F }, // Deseret
|
||||
{ 'begin': 0x1D000, 'end': 0x1D0FF }, // Byzantine Musical Symbols
|
||||
{ 'begin': 0x1D400, 'end': 0x1D7FF }, // Mathematical Alphanumeric Symbols
|
||||
{ 'begin': 0xFF000, 'end': 0xFFFFD }, // Private Use (plane 15)
|
||||
{ 'begin': 0xFE00, 'end': 0xFE0F }, // Variation Selectors
|
||||
{ 'begin': 0xE0000, 'end': 0xE007F }, // Tags
|
||||
{ 'begin': 0x1900, 'end': 0x194F }, // Limbu
|
||||
{ 'begin': 0x1950, 'end': 0x197F }, // Tai Le
|
||||
{ 'begin': 0x1980, 'end': 0x19DF }, // New Tai Lue
|
||||
{ 'begin': 0x1A00, 'end': 0x1A1F }, // Buginese
|
||||
{ 'begin': 0x2C00, 'end': 0x2C5F }, // Glagolitic
|
||||
{ 'begin': 0x2D30, 'end': 0x2D7F }, // Tifinagh
|
||||
{ 'begin': 0x4DC0, 'end': 0x4DFF }, // Yijing Hexagram Symbols
|
||||
{ 'begin': 0xA800, 'end': 0xA82F }, // Syloti Nagri
|
||||
{ 'begin': 0x10000, 'end': 0x1007F }, // Linear B Syllabary
|
||||
{ 'begin': 0x10140, 'end': 0x1018F }, // Ancient Greek Numbers
|
||||
{ 'begin': 0x10380, 'end': 0x1039F }, // Ugaritic
|
||||
{ 'begin': 0x103A0, 'end': 0x103DF }, // Old Persian
|
||||
{ 'begin': 0x10450, 'end': 0x1047F }, // Shavian
|
||||
{ 'begin': 0x10480, 'end': 0x104AF }, // Osmanya
|
||||
{ 'begin': 0x10800, 'end': 0x1083F }, // Cypriot Syllabary
|
||||
{ 'begin': 0x10A00, 'end': 0x10A5F }, // Kharoshthi
|
||||
{ 'begin': 0x1D300, 'end': 0x1D35F }, // Tai Xuan Jing Symbols
|
||||
{ 'begin': 0x12000, 'end': 0x123FF }, // Cuneiform
|
||||
{ 'begin': 0x1D360, 'end': 0x1D37F }, // Counting Rod Numerals
|
||||
{ 'begin': 0x1B80, 'end': 0x1BBF }, // Sundanese
|
||||
{ 'begin': 0x1C00, 'end': 0x1C4F }, // Lepcha
|
||||
{ 'begin': 0x1C50, 'end': 0x1C7F }, // Ol Chiki
|
||||
{ 'begin': 0xA880, 'end': 0xA8DF }, // Saurashtra
|
||||
{ 'begin': 0xA900, 'end': 0xA92F }, // Kayah Li
|
||||
{ 'begin': 0xA930, 'end': 0xA95F }, // Rejang
|
||||
{ 'begin': 0xAA00, 'end': 0xAA5F }, // Cham
|
||||
{ 'begin': 0x10190, 'end': 0x101CF }, // Ancient Symbols
|
||||
{ 'begin': 0x101D0, 'end': 0x101FF }, // Phaistos Disc
|
||||
{ 'begin': 0x102A0, 'end': 0x102DF }, // Carian
|
||||
{ 'begin': 0x1F030, 'end': 0x1F09F } // Domino Tiles
|
||||
{ 'begin': 0x0000, 'end': 0x007F, }, // Basic Latin
|
||||
{ 'begin': 0x0080, 'end': 0x00FF, }, // Latin-1 Supplement
|
||||
{ 'begin': 0x0100, 'end': 0x017F, }, // Latin Extended-A
|
||||
{ 'begin': 0x0180, 'end': 0x024F, }, // Latin Extended-B
|
||||
{ 'begin': 0x0250, 'end': 0x02AF, }, // IPA Extensions
|
||||
{ 'begin': 0x02B0, 'end': 0x02FF, }, // Spacing Modifier Letters
|
||||
{ 'begin': 0x0300, 'end': 0x036F, }, // Combining Diacritical Marks
|
||||
{ 'begin': 0x0370, 'end': 0x03FF, }, // Greek and Coptic
|
||||
{ 'begin': 0x2C80, 'end': 0x2CFF, }, // Coptic
|
||||
{ 'begin': 0x0400, 'end': 0x04FF, }, // Cyrillic
|
||||
{ 'begin': 0x0530, 'end': 0x058F, }, // Armenian
|
||||
{ 'begin': 0x0590, 'end': 0x05FF, }, // Hebrew
|
||||
{ 'begin': 0xA500, 'end': 0xA63F, }, // Vai
|
||||
{ 'begin': 0x0600, 'end': 0x06FF, }, // Arabic
|
||||
{ 'begin': 0x07C0, 'end': 0x07FF, }, // NKo
|
||||
{ 'begin': 0x0900, 'end': 0x097F, }, // Devanagari
|
||||
{ 'begin': 0x0980, 'end': 0x09FF, }, // Bengali
|
||||
{ 'begin': 0x0A00, 'end': 0x0A7F, }, // Gurmukhi
|
||||
{ 'begin': 0x0A80, 'end': 0x0AFF, }, // Gujarati
|
||||
{ 'begin': 0x0B00, 'end': 0x0B7F, }, // Oriya
|
||||
{ 'begin': 0x0B80, 'end': 0x0BFF, }, // Tamil
|
||||
{ 'begin': 0x0C00, 'end': 0x0C7F, }, // Telugu
|
||||
{ 'begin': 0x0C80, 'end': 0x0CFF, }, // Kannada
|
||||
{ 'begin': 0x0D00, 'end': 0x0D7F, }, // Malayalam
|
||||
{ 'begin': 0x0E00, 'end': 0x0E7F, }, // Thai
|
||||
{ 'begin': 0x0E80, 'end': 0x0EFF, }, // Lao
|
||||
{ 'begin': 0x10A0, 'end': 0x10FF, }, // Georgian
|
||||
{ 'begin': 0x1B00, 'end': 0x1B7F, }, // Balinese
|
||||
{ 'begin': 0x1100, 'end': 0x11FF, }, // Hangul Jamo
|
||||
{ 'begin': 0x1E00, 'end': 0x1EFF, }, // Latin Extended Additional
|
||||
{ 'begin': 0x1F00, 'end': 0x1FFF, }, // Greek Extended
|
||||
{ 'begin': 0x2000, 'end': 0x206F, }, // General Punctuation
|
||||
{ 'begin': 0x2070, 'end': 0x209F, }, // Superscripts And Subscripts
|
||||
{ 'begin': 0x20A0, 'end': 0x20CF, }, // Currency Symbol
|
||||
{ 'begin': 0x20D0, 'end': 0x20FF, }, // Combining Diacritical Marks
|
||||
{ 'begin': 0x2100, 'end': 0x214F, }, // Letterlike Symbols
|
||||
{ 'begin': 0x2150, 'end': 0x218F, }, // Number Forms
|
||||
{ 'begin': 0x2190, 'end': 0x21FF, }, // Arrows
|
||||
{ 'begin': 0x2200, 'end': 0x22FF, }, // Mathematical Operators
|
||||
{ 'begin': 0x2300, 'end': 0x23FF, }, // Miscellaneous Technical
|
||||
{ 'begin': 0x2400, 'end': 0x243F, }, // Control Pictures
|
||||
{ 'begin': 0x2440, 'end': 0x245F, }, // Optical Character Recognition
|
||||
{ 'begin': 0x2460, 'end': 0x24FF, }, // Enclosed Alphanumerics
|
||||
{ 'begin': 0x2500, 'end': 0x257F, }, // Box Drawing
|
||||
{ 'begin': 0x2580, 'end': 0x259F, }, // Block Elements
|
||||
{ 'begin': 0x25A0, 'end': 0x25FF, }, // Geometric Shapes
|
||||
{ 'begin': 0x2600, 'end': 0x26FF, }, // Miscellaneous Symbols
|
||||
{ 'begin': 0x2700, 'end': 0x27BF, }, // Dingbats
|
||||
{ 'begin': 0x3000, 'end': 0x303F, }, // CJK Symbols And Punctuation
|
||||
{ 'begin': 0x3040, 'end': 0x309F, }, // Hiragana
|
||||
{ 'begin': 0x30A0, 'end': 0x30FF, }, // Katakana
|
||||
{ 'begin': 0x3100, 'end': 0x312F, }, // Bopomofo
|
||||
{ 'begin': 0x3130, 'end': 0x318F, }, // Hangul Compatibility Jamo
|
||||
{ 'begin': 0xA840, 'end': 0xA87F, }, // Phags-pa
|
||||
{ 'begin': 0x3200, 'end': 0x32FF, }, // Enclosed CJK Letters And Months
|
||||
{ 'begin': 0x3300, 'end': 0x33FF, }, // CJK Compatibility
|
||||
{ 'begin': 0xAC00, 'end': 0xD7AF, }, // Hangul Syllables
|
||||
{ 'begin': 0xD800, 'end': 0xDFFF, }, // Non-Plane 0 *
|
||||
{ 'begin': 0x10900, 'end': 0x1091F, }, // Phoenicia
|
||||
{ 'begin': 0x4E00, 'end': 0x9FFF, }, // CJK Unified Ideographs
|
||||
{ 'begin': 0xE000, 'end': 0xF8FF, }, // Private Use Area (plane 0)
|
||||
{ 'begin': 0x31C0, 'end': 0x31EF, }, // CJK Strokes
|
||||
{ 'begin': 0xFB00, 'end': 0xFB4F, }, // Alphabetic Presentation Forms
|
||||
{ 'begin': 0xFB50, 'end': 0xFDFF, }, // Arabic Presentation Forms-A
|
||||
{ 'begin': 0xFE20, 'end': 0xFE2F, }, // Combining Half Marks
|
||||
{ 'begin': 0xFE10, 'end': 0xFE1F, }, // Vertical Forms
|
||||
{ 'begin': 0xFE50, 'end': 0xFE6F, }, // Small Form Variants
|
||||
{ 'begin': 0xFE70, 'end': 0xFEFF, }, // Arabic Presentation Forms-B
|
||||
{ 'begin': 0xFF00, 'end': 0xFFEF, }, // Halfwidth And Fullwidth Forms
|
||||
{ 'begin': 0xFFF0, 'end': 0xFFFF, }, // Specials
|
||||
{ 'begin': 0x0F00, 'end': 0x0FFF, }, // Tibetan
|
||||
{ 'begin': 0x0700, 'end': 0x074F, }, // Syriac
|
||||
{ 'begin': 0x0780, 'end': 0x07BF, }, // Thaana
|
||||
{ 'begin': 0x0D80, 'end': 0x0DFF, }, // Sinhala
|
||||
{ 'begin': 0x1000, 'end': 0x109F, }, // Myanmar
|
||||
{ 'begin': 0x1200, 'end': 0x137F, }, // Ethiopic
|
||||
{ 'begin': 0x13A0, 'end': 0x13FF, }, // Cherokee
|
||||
{ 'begin': 0x1400, 'end': 0x167F, }, // Unified Canadian Aboriginal Syllabics
|
||||
{ 'begin': 0x1680, 'end': 0x169F, }, // Ogham
|
||||
{ 'begin': 0x16A0, 'end': 0x16FF, }, // Runic
|
||||
{ 'begin': 0x1780, 'end': 0x17FF, }, // Khmer
|
||||
{ 'begin': 0x1800, 'end': 0x18AF, }, // Mongolian
|
||||
{ 'begin': 0x2800, 'end': 0x28FF, }, // Braille Patterns
|
||||
{ 'begin': 0xA000, 'end': 0xA48F, }, // Yi Syllables
|
||||
{ 'begin': 0x1700, 'end': 0x171F, }, // Tagalog
|
||||
{ 'begin': 0x10300, 'end': 0x1032F, }, // Old Italic
|
||||
{ 'begin': 0x10330, 'end': 0x1034F, }, // Gothic
|
||||
{ 'begin': 0x10400, 'end': 0x1044F, }, // Deseret
|
||||
{ 'begin': 0x1D000, 'end': 0x1D0FF, }, // Byzantine Musical Symbols
|
||||
{ 'begin': 0x1D400, 'end': 0x1D7FF, }, // Mathematical Alphanumeric Symbols
|
||||
{ 'begin': 0xFF000, 'end': 0xFFFFD, }, // Private Use (plane 15)
|
||||
{ 'begin': 0xFE00, 'end': 0xFE0F, }, // Variation Selectors
|
||||
{ 'begin': 0xE0000, 'end': 0xE007F, }, // Tags
|
||||
{ 'begin': 0x1900, 'end': 0x194F, }, // Limbu
|
||||
{ 'begin': 0x1950, 'end': 0x197F, }, // Tai Le
|
||||
{ 'begin': 0x1980, 'end': 0x19DF, }, // New Tai Lue
|
||||
{ 'begin': 0x1A00, 'end': 0x1A1F, }, // Buginese
|
||||
{ 'begin': 0x2C00, 'end': 0x2C5F, }, // Glagolitic
|
||||
{ 'begin': 0x2D30, 'end': 0x2D7F, }, // Tifinagh
|
||||
{ 'begin': 0x4DC0, 'end': 0x4DFF, }, // Yijing Hexagram Symbols
|
||||
{ 'begin': 0xA800, 'end': 0xA82F, }, // Syloti Nagri
|
||||
{ 'begin': 0x10000, 'end': 0x1007F, }, // Linear B Syllabary
|
||||
{ 'begin': 0x10140, 'end': 0x1018F, }, // Ancient Greek Numbers
|
||||
{ 'begin': 0x10380, 'end': 0x1039F, }, // Ugaritic
|
||||
{ 'begin': 0x103A0, 'end': 0x103DF, }, // Old Persian
|
||||
{ 'begin': 0x10450, 'end': 0x1047F, }, // Shavian
|
||||
{ 'begin': 0x10480, 'end': 0x104AF, }, // Osmanya
|
||||
{ 'begin': 0x10800, 'end': 0x1083F, }, // Cypriot Syllabary
|
||||
{ 'begin': 0x10A00, 'end': 0x10A5F, }, // Kharoshthi
|
||||
{ 'begin': 0x1D300, 'end': 0x1D35F, }, // Tai Xuan Jing Symbols
|
||||
{ 'begin': 0x12000, 'end': 0x123FF, }, // Cuneiform
|
||||
{ 'begin': 0x1D360, 'end': 0x1D37F, }, // Counting Rod Numerals
|
||||
{ 'begin': 0x1B80, 'end': 0x1BBF, }, // Sundanese
|
||||
{ 'begin': 0x1C00, 'end': 0x1C4F, }, // Lepcha
|
||||
{ 'begin': 0x1C50, 'end': 0x1C7F, }, // Ol Chiki
|
||||
{ 'begin': 0xA880, 'end': 0xA8DF, }, // Saurashtra
|
||||
{ 'begin': 0xA900, 'end': 0xA92F, }, // Kayah Li
|
||||
{ 'begin': 0xA930, 'end': 0xA95F, }, // Rejang
|
||||
{ 'begin': 0xAA00, 'end': 0xAA5F, }, // Cham
|
||||
{ 'begin': 0x10190, 'end': 0x101CF, }, // Ancient Symbols
|
||||
{ 'begin': 0x101D0, 'end': 0x101FF, }, // Phaistos Disc
|
||||
{ 'begin': 0x102A0, 'end': 0x102DF, }, // Carian
|
||||
{ 'begin': 0x1F030, 'end': 0x1F09F, } // Domino Tiles
|
||||
];
|
||||
|
||||
function getUnicodeRangeFor(value) {
|
||||
|
@ -46,7 +46,7 @@ var WorkerTask = (function WorkerTaskClosure() {
|
||||
if (this.terminated) {
|
||||
throw new Error('Worker task was terminated');
|
||||
}
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return WorkerTask;
|
||||
@ -241,7 +241,7 @@ var PDFWorkerStream = (function PDFWorkerStreamClosure() {
|
||||
// Reporting to first range reader.
|
||||
var firstReader = this._rangeReaders[0];
|
||||
if (firstReader.onProgress) {
|
||||
firstReader.onProgress({loaded: evt.loaded});
|
||||
firstReader.onProgress({ loaded: evt.loaded, });
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -275,7 +275,7 @@ var PDFWorkerStream = (function PDFWorkerStreamClosure() {
|
||||
readers.forEach(function (rangeReader) {
|
||||
rangeReader.cancel(reason);
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/** @implements {IPDFStreamReader} */
|
||||
@ -296,7 +296,7 @@ var PDFWorkerStream = (function PDFWorkerStreamClosure() {
|
||||
}
|
||||
if (this._requests.length > 0) {
|
||||
var requestCapability = this._requests.shift();
|
||||
requestCapability.resolve({value: chunk, done: false});
|
||||
requestCapability.resolve({ value: chunk, done: false, });
|
||||
return;
|
||||
}
|
||||
this._queuedChunks.push(chunk);
|
||||
@ -321,10 +321,10 @@ var PDFWorkerStream = (function PDFWorkerStreamClosure() {
|
||||
read: function PDFWorkerStreamReader_read() {
|
||||
if (this._queuedChunks.length > 0) {
|
||||
var chunk = this._queuedChunks.shift();
|
||||
return Promise.resolve({value: chunk, done: false});
|
||||
return Promise.resolve({ value: chunk, done: false, });
|
||||
}
|
||||
if (this._done) {
|
||||
return Promise.resolve({value: undefined, done: true});
|
||||
return Promise.resolve({ value: undefined, done: true, });
|
||||
}
|
||||
var requestCapability = createPromiseCapability();
|
||||
this._requests.push(requestCapability);
|
||||
@ -334,10 +334,10 @@ var PDFWorkerStream = (function PDFWorkerStreamClosure() {
|
||||
cancel: function PDFWorkerStreamReader_cancel(reason) {
|
||||
this._done = true;
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({value: undefined, done: true});
|
||||
requestCapability.resolve({ value: undefined, done: true, });
|
||||
});
|
||||
this._requests = [];
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
/** @implements {IPDFStreamRangeReader} */
|
||||
@ -360,9 +360,9 @@ var PDFWorkerStream = (function PDFWorkerStreamClosure() {
|
||||
this._queuedChunk = chunk;
|
||||
} else {
|
||||
var requestsCapability = this._requests.shift();
|
||||
requestsCapability.resolve({value: chunk, done: false});
|
||||
requestsCapability.resolve({ value: chunk, done: false, });
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({value: undefined, done: true});
|
||||
requestCapability.resolve({ value: undefined, done: true, });
|
||||
});
|
||||
this._requests = [];
|
||||
}
|
||||
@ -376,10 +376,10 @@ var PDFWorkerStream = (function PDFWorkerStreamClosure() {
|
||||
|
||||
read: function PDFWorkerStreamRangeReader_read() {
|
||||
if (this._queuedChunk) {
|
||||
return Promise.resolve({value: this._queuedChunk, done: false});
|
||||
return Promise.resolve({ value: this._queuedChunk, done: false, });
|
||||
}
|
||||
if (this._done) {
|
||||
return Promise.resolve({value: undefined, done: true});
|
||||
return Promise.resolve({ value: undefined, done: true, });
|
||||
}
|
||||
var requestCapability = createPromiseCapability();
|
||||
this._requests.push(requestCapability);
|
||||
@ -389,11 +389,11 @@ var PDFWorkerStream = (function PDFWorkerStreamClosure() {
|
||||
cancel: function PDFWorkerStreamRangeReader_cancel(reason) {
|
||||
this._done = true;
|
||||
this._requests.forEach(function (requestCapability) {
|
||||
requestCapability.resolve({value: undefined, done: true});
|
||||
requestCapability.resolve({ value: undefined, done: true, });
|
||||
});
|
||||
this._requests = [];
|
||||
this._stream._removeRangeReader(this);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
return PDFWorkerStream;
|
||||
@ -558,7 +558,7 @@ var WorkerMessageHandler = {
|
||||
fullRequest.onProgress = function (evt) {
|
||||
handler.send('DocProgress', {
|
||||
loaded: evt.loaded,
|
||||
total: evt.total
|
||||
total: evt.total,
|
||||
});
|
||||
};
|
||||
}
|
||||
@ -576,7 +576,7 @@ var WorkerMessageHandler = {
|
||||
password: source.password,
|
||||
length: fullRequest.contentLength,
|
||||
disableAutoFetch,
|
||||
rangeChunkSize: source.rangeChunkSize
|
||||
rangeChunkSize: source.rangeChunkSize,
|
||||
}, evaluatorOptions, docBaseUrl);
|
||||
pdfManagerCapability.resolve(pdfManager);
|
||||
cancelXHRs = null;
|
||||
@ -618,7 +618,7 @@ var WorkerMessageHandler = {
|
||||
if (!fullRequest.isStreamingSupported) {
|
||||
handler.send('DocProgress', {
|
||||
loaded,
|
||||
total: Math.max(loaded, fullRequest.contentLength || 0)
|
||||
total: Math.max(loaded, fullRequest.contentLength || 0),
|
||||
});
|
||||
}
|
||||
|
||||
@ -650,7 +650,7 @@ var WorkerMessageHandler = {
|
||||
function setupDoc(data) {
|
||||
function onSuccess(doc) {
|
||||
ensureNotTerminated();
|
||||
handler.send('GetDoc', { pdfInfo: doc });
|
||||
handler.send('GetDoc', { pdfInfo: doc, });
|
||||
}
|
||||
|
||||
function onFailure(e) {
|
||||
@ -719,7 +719,7 @@ var WorkerMessageHandler = {
|
||||
pdfManager = newPdfManager;
|
||||
handler.send('PDFManagerReady', null);
|
||||
pdfManager.onLoadedStream().then(function(stream) {
|
||||
handler.send('DataLoaded', { length: stream.bytes.byteLength });
|
||||
handler.send('DataLoaded', { length: stream.bytes.byteLength, });
|
||||
});
|
||||
}).then(pdfManagerReady, onFailure);
|
||||
}
|
||||
@ -738,7 +738,7 @@ var WorkerMessageHandler = {
|
||||
rotate: results[0],
|
||||
ref: results[1],
|
||||
userUnit: results[2],
|
||||
view: results[3]
|
||||
view: results[3],
|
||||
};
|
||||
});
|
||||
});
|
||||
@ -840,7 +840,7 @@ var WorkerMessageHandler = {
|
||||
// For compatibility with older behavior, generating unknown
|
||||
// unsupported feature notification on errors.
|
||||
handler.send('UnsupportedFeature',
|
||||
{featureId: UNSUPPORTED_FEATURES.unknown});
|
||||
{ featureId: UNSUPPORTED_FEATURES.unknown, });
|
||||
|
||||
var minimumStackMessage =
|
||||
'worker.js: while trying to getPage() and getOperatorList()';
|
||||
@ -851,24 +851,24 @@ var WorkerMessageHandler = {
|
||||
if (typeof e === 'string') {
|
||||
wrappedException = {
|
||||
message: e,
|
||||
stack: minimumStackMessage
|
||||
stack: minimumStackMessage,
|
||||
};
|
||||
} else if (typeof e === 'object') {
|
||||
wrappedException = {
|
||||
message: e.message || e.toString(),
|
||||
stack: e.stack || minimumStackMessage
|
||||
stack: e.stack || minimumStackMessage,
|
||||
};
|
||||
} else {
|
||||
wrappedException = {
|
||||
message: 'Unknown exception type: ' + (typeof e),
|
||||
stack: minimumStackMessage
|
||||
stack: minimumStackMessage,
|
||||
};
|
||||
}
|
||||
|
||||
handler.send('PageError', {
|
||||
pageNum,
|
||||
error: wrappedException,
|
||||
intent: data.intent
|
||||
intent: data.intent,
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user