Add // prettier-ignore
comments to prevent re-formatting of certain data structures
There's a fair number of (primarily) `Array`s/`TypedArray`s whose formatting we don't want disturb, since in many cases that would lead to the code becoming much more difficult to read and/or break existing inline comments. *Please note:* It may be a good idea to look through these cases individually, and possibly re-write some of the them (especially the `String` ones) to reduce the need for all of these ignore commands.
This commit is contained in:
parent
c3a1c67950
commit
8ec1dfde49
@ -17,6 +17,7 @@ import { warn } from '../shared/util';
|
|||||||
|
|
||||||
// Character types for symbols from 0000 to 00FF.
|
// Character types for symbols from 0000 to 00FF.
|
||||||
// Source: ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt
|
// Source: ftp://ftp.unicode.org/Public/UNIDATA/UnicodeData.txt
|
||||||
|
// prettier-ignore
|
||||||
var baseTypes = [
|
var baseTypes = [
|
||||||
'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S',
|
'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'S', 'B', 'S',
|
||||||
'WS', 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
|
'WS', 'B', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN', 'BN',
|
||||||
@ -46,6 +47,7 @@ var baseTypes = [
|
|||||||
// http://unicode.org/charts/PDF/U0600.pdf), so we replace it with an
|
// http://unicode.org/charts/PDF/U0600.pdf), so we replace it with an
|
||||||
// empty string and issue a warning if we encounter this character. The
|
// empty string and issue a warning if we encounter this character. The
|
||||||
// empty string is required to properly index the items after it.
|
// empty string is required to properly index the items after it.
|
||||||
|
// prettier-ignore
|
||||||
var arabicTypes = [
|
var arabicTypes = [
|
||||||
'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'ON', 'ON', 'AL', 'ET', 'ET', 'AL',
|
'AN', 'AN', 'AN', 'AN', 'AN', 'AN', 'ON', 'ON', 'AL', 'ET', 'ET', 'AL',
|
||||||
'CS', 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
|
'CS', 'AL', 'ON', 'ON', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM', 'NSM',
|
||||||
|
@ -41,6 +41,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
|
|||||||
const twoDimVertR3 = 7;
|
const twoDimVertR3 = 7;
|
||||||
const twoDimVertL3 = 8;
|
const twoDimVertL3 = 8;
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const twoDimTable = [
|
const twoDimTable = [
|
||||||
[-1, -1], [-1, -1], // 000000x
|
[-1, -1], [-1, -1], // 000000x
|
||||||
[7, twoDimVertL3], // 0000010
|
[7, twoDimVertL3], // 0000010
|
||||||
@ -109,6 +110,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
|
|||||||
[1, twoDimVert0], [1, twoDimVert0]
|
[1, twoDimVert0], [1, twoDimVert0]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const whiteTable1 = [
|
const whiteTable1 = [
|
||||||
[-1, -1], // 00000
|
[-1, -1], // 00000
|
||||||
[12, ccittEOL], // 00001
|
[12, ccittEOL], // 00001
|
||||||
@ -131,6 +133,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
|
|||||||
[12, 2560] // 11111
|
[12, 2560] // 11111
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const whiteTable2 = [
|
const whiteTable2 = [
|
||||||
[-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000000xx
|
[-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000000xx
|
||||||
[8, 29], [8, 29], // 00000010x
|
[8, 29], [8, 29], // 00000010x
|
||||||
@ -295,6 +298,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
|
|||||||
[4, 7], [4, 7], [4, 7], [4, 7]
|
[4, 7], [4, 7], [4, 7], [4, 7]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const blackTable1 = [
|
const blackTable1 = [
|
||||||
[-1, -1], [-1, -1], // 000000000000x
|
[-1, -1], [-1, -1], // 000000000000x
|
||||||
[12, ccittEOL], [12, ccittEOL], // 000000000001x
|
[12, ccittEOL], [12, ccittEOL], // 000000000001x
|
||||||
@ -356,6 +360,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
|
|||||||
[10, 64], [10, 64], [10, 64], [10, 64]
|
[10, 64], [10, 64], [10, 64], [10, 64]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const blackTable2 = [
|
const blackTable2 = [
|
||||||
[8, 13], [8, 13], [8, 13], [8, 13], // 00000100xxxx
|
[8, 13], [8, 13], [8, 13], [8, 13], // 00000100xxxx
|
||||||
[8, 13], [8, 13], [8, 13], [8, 13],
|
[8, 13], [8, 13], [8, 13], [8, 13],
|
||||||
@ -435,6 +440,7 @@ let CCITTFaxDecoder = (function CCITTFaxDecoder() {
|
|||||||
[7, 12], [7, 12], [7, 12], [7, 12]
|
[7, 12], [7, 12], [7, 12], [7, 12]
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const blackTable3 = [
|
const blackTable3 = [
|
||||||
[-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000xx
|
[-1, -1], [-1, -1], [-1, -1], [-1, -1], // 0000xx
|
||||||
[6, 9], // 000100
|
[6, 9], // 000100
|
||||||
|
@ -28,6 +28,7 @@ var MAX_SUBR_NESTING = 10;
|
|||||||
* The CFF class takes a Type1 file and wrap it into a
|
* The CFF class takes a Type1 file and wrap it into a
|
||||||
* 'Compact Font Format' which itself embed Type2 charstrings.
|
* 'Compact Font Format' which itself embed Type2 charstrings.
|
||||||
*/
|
*/
|
||||||
|
// prettier-ignore
|
||||||
var CFFStandardStrings = [
|
var CFFStandardStrings = [
|
||||||
'.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
|
'.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar', 'percent',
|
||||||
'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus',
|
'ampersand', 'quoteright', 'parenleft', 'parenright', 'asterisk', 'plus',
|
||||||
@ -339,7 +340,8 @@ var CFFParser = (function CFFParserClosure() {
|
|||||||
function parseFloatOperand() {
|
function parseFloatOperand() {
|
||||||
var str = '';
|
var str = '';
|
||||||
var eof = 15;
|
var eof = 15;
|
||||||
var lookup = ['0', '1', '2', '3', '4', '5', '6', '7', '8',
|
// prettier-ignore
|
||||||
|
const lookup = ['0', '1', '2', '3', '4', '5', '6', '7', '8',
|
||||||
'9', '.', 'E', 'E-', null, '-'];
|
'9', '.', 'E', 'E-', null, '-'];
|
||||||
var length = dict.length;
|
var length = dict.length;
|
||||||
while (pos < length) {
|
while (pos < length) {
|
||||||
@ -1087,6 +1089,7 @@ var CFFTopDict = (function CFFTopDictClosure() {
|
|||||||
[[12, 4], 'UnderlineThickness', 'num', 50],
|
[[12, 4], 'UnderlineThickness', 'num', 50],
|
||||||
[[12, 5], 'PaintType', 'num', 0],
|
[[12, 5], 'PaintType', 'num', 0],
|
||||||
[[12, 6], 'CharstringType', 'num', 2],
|
[[12, 6], 'CharstringType', 'num', 2],
|
||||||
|
// prettier-ignore
|
||||||
[[12, 7], 'FontMatrix', ['num', 'num', 'num', 'num', 'num', 'num'],
|
[[12, 7], 'FontMatrix', ['num', 'num', 'num', 'num', 'num', 'num'],
|
||||||
[0.001, 0, 0, 0.001, 0, 0]],
|
[0.001, 0, 0, 0.001, 0, 0]],
|
||||||
[13, 'UniqueID', 'num', null],
|
[13, 'UniqueID', 'num', null],
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
*/
|
*/
|
||||||
/* eslint no-var: error */
|
/* eslint no-var: error */
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const ISOAdobeCharset = [
|
const ISOAdobeCharset = [
|
||||||
'.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',
|
'.notdef', 'space', 'exclam', 'quotedbl', 'numbersign', 'dollar',
|
||||||
'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',
|
'percent', 'ampersand', 'quoteright', 'parenleft', 'parenright',
|
||||||
@ -51,6 +52,7 @@ const ISOAdobeCharset = [
|
|||||||
'ugrave', 'yacute', 'ydieresis', 'zcaron'
|
'ugrave', 'yacute', 'ydieresis', 'zcaron'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const ExpertCharset = [
|
const ExpertCharset = [
|
||||||
'.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',
|
'.notdef', 'space', 'exclamsmall', 'Hungarumlautsmall', 'dollaroldstyle',
|
||||||
'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',
|
'dollarsuperior', 'ampersandsmall', 'Acutesmall', 'parenleftsuperior',
|
||||||
@ -91,6 +93,7 @@ const ExpertCharset = [
|
|||||||
'Ydieresissmall'
|
'Ydieresissmall'
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const ExpertSubsetCharset = [
|
const ExpertSubsetCharset = [
|
||||||
'.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',
|
'.notdef', 'space', 'dollaroldstyle', 'dollarsuperior',
|
||||||
'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
|
'parenleftsuperior', 'parenrightsuperior', 'twodotenleader',
|
||||||
|
@ -863,17 +863,20 @@ const CalGrayCS = (function CalGrayCSClosure() {
|
|||||||
const CalRGBCS = (function CalRGBCSClosure() {
|
const CalRGBCS = (function CalRGBCSClosure() {
|
||||||
// See http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html for these
|
// See http://www.brucelindbloom.com/index.html?Eqn_ChromAdapt.html for these
|
||||||
// matrices.
|
// matrices.
|
||||||
|
// prettier-ignore
|
||||||
const BRADFORD_SCALE_MATRIX = new Float32Array([
|
const BRADFORD_SCALE_MATRIX = new Float32Array([
|
||||||
0.8951, 0.2664, -0.1614,
|
0.8951, 0.2664, -0.1614,
|
||||||
-0.7502, 1.7135, 0.0367,
|
-0.7502, 1.7135, 0.0367,
|
||||||
0.0389, -0.0685, 1.0296]);
|
0.0389, -0.0685, 1.0296]);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const BRADFORD_SCALE_INVERSE_MATRIX = new Float32Array([
|
const BRADFORD_SCALE_INVERSE_MATRIX = new Float32Array([
|
||||||
0.9869929, -0.1470543, 0.1599627,
|
0.9869929, -0.1470543, 0.1599627,
|
||||||
0.4323053, 0.5183603, 0.0492912,
|
0.4323053, 0.5183603, 0.0492912,
|
||||||
-0.0085287, 0.0400428, 0.9684867]);
|
-0.0085287, 0.0400428, 0.9684867]);
|
||||||
|
|
||||||
// See http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html.
|
// See http://www.brucelindbloom.com/index.html?Eqn_RGB_XYZ_Matrix.html.
|
||||||
|
// prettier-ignore
|
||||||
const SRGB_D65_XYZ_TO_RGB_MATRIX = new Float32Array([
|
const SRGB_D65_XYZ_TO_RGB_MATRIX = new Float32Array([
|
||||||
3.2404542, -1.5371385, -0.4985314,
|
3.2404542, -1.5371385, -0.4985314,
|
||||||
-0.9692660, 1.8760108, 0.0415560,
|
-0.9692660, 1.8760108, 0.0415560,
|
||||||
|
@ -87,6 +87,7 @@ function getInheritableProperty({ dict, key, getArray = false,
|
|||||||
return values;
|
return values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const ROMAN_NUMBER_MAP = [
|
const ROMAN_NUMBER_MAP = [
|
||||||
'', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM',
|
'', 'C', 'CC', 'CCC', 'CD', 'D', 'DC', 'DCC', 'DCCC', 'CM',
|
||||||
'', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC',
|
'', 'X', 'XX', 'XXX', 'XL', 'L', 'LX', 'LXX', 'LXXX', 'XC',
|
||||||
|
@ -63,12 +63,14 @@ var ARCFourCipher = (function ARCFourCipherClosure() {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
var calculateMD5 = (function calculateMD5Closure() {
|
var calculateMD5 = (function calculateMD5Closure() {
|
||||||
|
// prettier-ignore
|
||||||
var r = new Uint8Array([
|
var r = new Uint8Array([
|
||||||
7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
|
7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
|
||||||
5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20,
|
5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20, 5, 9, 14, 20,
|
||||||
4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
|
4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23, 4, 11, 16, 23,
|
||||||
6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]);
|
6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21, 6, 10, 15, 21]);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
var k = new Int32Array([
|
var k = new Int32Array([
|
||||||
-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426,
|
-680876936, -389564586, 606105819, -1044525330, -176418897, 1200080426,
|
||||||
-1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162,
|
-1473231341, -45705983, 1770035416, -1958414417, -42063, -1990404162,
|
||||||
@ -136,6 +138,7 @@ var calculateMD5 = (function calculateMD5Closure() {
|
|||||||
h2 = (h2 + c) | 0;
|
h2 = (h2 + c) | 0;
|
||||||
h3 = (h3 + d) | 0;
|
h3 = (h3 + d) | 0;
|
||||||
}
|
}
|
||||||
|
// prettier-ignore
|
||||||
return new Uint8Array([
|
return new Uint8Array([
|
||||||
h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >>> 24) & 0xFF,
|
h0 & 0xFF, (h0 >> 8) & 0xFF, (h0 >> 16) & 0xFF, (h0 >>> 24) & 0xFF,
|
||||||
h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >>> 24) & 0xFF,
|
h1 & 0xFF, (h1 >> 8) & 0xFF, (h1 >> 16) & 0xFF, (h1 >>> 24) & 0xFF,
|
||||||
@ -263,6 +266,7 @@ var calculateSHA256 = (function calculateSHA256Closure() {
|
|||||||
return rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10;
|
return rotr(x, 17) ^ rotr(x, 19) ^ x >>> 10;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
var k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
|
var k = [0x428a2f98, 0x71374491, 0xb5c0fbcf, 0xe9b5dba5,
|
||||||
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
0x3956c25b, 0x59f111f1, 0x923f82a4, 0xab1c5ed5,
|
||||||
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
|
0xd807aa98, 0x12835b01, 0x243185be, 0x550c7dc3,
|
||||||
@ -341,6 +345,7 @@ var calculateSHA256 = (function calculateSHA256Closure() {
|
|||||||
h6 = (h6 + g) | 0;
|
h6 = (h6 + g) | 0;
|
||||||
h7 = (h7 + h) | 0;
|
h7 = (h7 + h) | 0;
|
||||||
}
|
}
|
||||||
|
// prettier-ignore
|
||||||
return new Uint8Array([
|
return new Uint8Array([
|
||||||
(h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, (h0) & 0xFF,
|
(h0 >> 24) & 0xFF, (h0 >> 16) & 0xFF, (h0 >> 8) & 0xFF, (h0) & 0xFF,
|
||||||
(h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, (h1) & 0xFF,
|
(h1 >> 24) & 0xFF, (h1 >> 16) & 0xFF, (h1 >> 8) & 0xFF, (h1) & 0xFF,
|
||||||
@ -421,6 +426,7 @@ var calculateSHA512 = (function calculateSHA512Closure() {
|
|||||||
result.xor(tmp);
|
result.xor(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
var k = [
|
var k = [
|
||||||
new Word64(0x428a2f98, 0xd728ae22), new Word64(0x71374491, 0x23ef65cd),
|
new Word64(0x428a2f98, 0xd728ae22), new Word64(0x71374491, 0x23ef65cd),
|
||||||
new Word64(0xb5c0fbcf, 0xec4d3b2f), new Word64(0xe9b5dba5, 0x8189dbbc),
|
new Word64(0xb5c0fbcf, 0xec4d3b2f), new Word64(0xe9b5dba5, 0x8189dbbc),
|
||||||
@ -635,6 +641,7 @@ class AESBaseCipher {
|
|||||||
unreachable('Cannot initialize AESBaseCipher.');
|
unreachable('Cannot initialize AESBaseCipher.');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
this._s = new Uint8Array([
|
this._s = new Uint8Array([
|
||||||
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b,
|
0x63, 0x7c, 0x77, 0x7b, 0xf2, 0x6b, 0x6f, 0xc5, 0x30, 0x01, 0x67, 0x2b,
|
||||||
0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
|
0xfe, 0xd7, 0xab, 0x76, 0xca, 0x82, 0xc9, 0x7d, 0xfa, 0x59, 0x47, 0xf0,
|
||||||
@ -660,6 +667,7 @@ class AESBaseCipher {
|
|||||||
0xb0, 0x54, 0xbb, 0x16,
|
0xb0, 0x54, 0xbb, 0x16,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
this._inv_s = new Uint8Array([
|
this._inv_s = new Uint8Array([
|
||||||
0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e,
|
0x52, 0x09, 0x6a, 0xd5, 0x30, 0x36, 0xa5, 0x38, 0xbf, 0x40, 0xa3, 0x9e,
|
||||||
0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,
|
0x81, 0xf3, 0xd7, 0xfb, 0x7c, 0xe3, 0x39, 0x82, 0x9b, 0x2f, 0xff, 0x87,
|
||||||
@ -685,6 +693,7 @@ class AESBaseCipher {
|
|||||||
0x55, 0x21, 0x0c, 0x7d,
|
0x55, 0x21, 0x0c, 0x7d,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
this._mix = new Uint32Array([
|
this._mix = new Uint32Array([
|
||||||
0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927,
|
0x00000000, 0x0e090d0b, 0x1c121a16, 0x121b171d, 0x3824342c, 0x362d3927,
|
||||||
0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45,
|
0x24362e3a, 0x2a3f2331, 0x70486858, 0x7e416553, 0x6c5a724e, 0x62537f45,
|
||||||
@ -1040,6 +1049,7 @@ class AES128Cipher extends AESBaseCipher {
|
|||||||
this._cyclesOfRepetition = 10;
|
this._cyclesOfRepetition = 10;
|
||||||
this._keySize = 160; // bits
|
this._keySize = 160; // bits
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
this._rcon = new Uint8Array([
|
this._rcon = new Uint8Array([
|
||||||
0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
|
0x8d, 0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80, 0x1b, 0x36, 0x6c,
|
||||||
0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
|
0xd8, 0xab, 0x4d, 0x9a, 0x2f, 0x5e, 0xbc, 0x63, 0xc6, 0x97, 0x35, 0x6a,
|
||||||
@ -1373,6 +1383,7 @@ var CipherTransform = (function CipherTransformClosure() {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
var CipherTransformFactory = (function CipherTransformFactoryClosure() {
|
var CipherTransformFactory = (function CipherTransformFactoryClosure() {
|
||||||
|
// prettier-ignore
|
||||||
var defaultPasswordBytes = new Uint8Array([
|
var defaultPasswordBytes = new Uint8Array([
|
||||||
0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41,
|
0x28, 0xBF, 0x4E, 0x5E, 0x4E, 0x75, 0x8A, 0x41,
|
||||||
0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08,
|
0x64, 0x00, 0x4E, 0x56, 0xFF, 0xFA, 0x01, 0x08,
|
||||||
|
@ -345,6 +345,7 @@ class Page {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const PDF_HEADER_SIGNATURE = new Uint8Array([0x25, 0x50, 0x44, 0x46, 0x2D]);
|
const PDF_HEADER_SIGNATURE = new Uint8Array([0x25, 0x50, 0x44, 0x46, 0x2D]);
|
||||||
|
// prettier-ignore
|
||||||
const STARTXREF_SIGNATURE = new Uint8Array([
|
const STARTXREF_SIGNATURE = new Uint8Array([
|
||||||
0x73, 0x74, 0x61, 0x72, 0x74, 0x78, 0x72, 0x65, 0x66]);
|
0x73, 0x74, 0x61, 0x72, 0x74, 0x78, 0x72, 0x65, 0x66]);
|
||||||
const ENDOBJ_SIGNATURE = new Uint8Array([0x65, 0x6E, 0x64, 0x6F, 0x62, 0x6A]);
|
const ENDOBJ_SIGNATURE = new Uint8Array([0x65, 0x6E, 0x64, 0x6F, 0x62, 0x6A]);
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const ExpertEncoding = [
|
const ExpertEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
@ -56,6 +57,7 @@ const ExpertEncoding = [
|
|||||||
'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
|
'Ucircumflexsmall', 'Udieresissmall', 'Yacutesmall', 'Thornsmall',
|
||||||
'Ydieresissmall'];
|
'Ydieresissmall'];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const MacExpertEncoding = [
|
const MacExpertEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
@ -98,6 +100,7 @@ const MacExpertEncoding = [
|
|||||||
'Macronsmall', 'bsuperior', 'nsuperior', 'msuperior', 'commasuperior',
|
'Macronsmall', 'bsuperior', 'nsuperior', 'msuperior', 'commasuperior',
|
||||||
'periodsuperior', 'Dotaccentsmall', 'Ringsmall', '', '', '', ''];
|
'periodsuperior', 'Dotaccentsmall', 'Ringsmall', '', '', '', ''];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const MacRomanEncoding = [
|
const MacRomanEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
@ -134,6 +137,7 @@ const MacRomanEncoding = [
|
|||||||
'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',
|
'tilde', 'macron', 'breve', 'dotaccent', 'ring', 'cedilla', 'hungarumlaut',
|
||||||
'ogonek', 'caron'];
|
'ogonek', 'caron'];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const StandardEncoding = [
|
const StandardEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
@ -162,6 +166,7 @@ const StandardEncoding = [
|
|||||||
'', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls', '',
|
'', '', '', 'dotlessi', '', '', 'lslash', 'oslash', 'oe', 'germandbls', '',
|
||||||
'', '', ''];
|
'', '', ''];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const WinAnsiEncoding = [
|
const WinAnsiEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
@ -198,6 +203,7 @@ const WinAnsiEncoding = [
|
|||||||
'ugrave', 'uacute', 'ucircumflex', 'udieresis', 'yacute', 'thorn',
|
'ugrave', 'uacute', 'ucircumflex', 'udieresis', 'yacute', 'thorn',
|
||||||
'ydieresis'];
|
'ydieresis'];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const SymbolSetEncoding = [
|
const SymbolSetEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
@ -236,6 +242,7 @@ const SymbolSetEncoding = [
|
|||||||
'bracketrightex', 'bracketrightbt', 'bracerighttp', 'bracerightmid',
|
'bracketrightex', 'bracketrightbt', 'bracerighttp', 'bracerightmid',
|
||||||
'bracerightbt', ''];
|
'bracerightbt', ''];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const ZapfDingbatsEncoding = [
|
const ZapfDingbatsEncoding = [
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
'', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
|
||||||
|
@ -2037,6 +2037,7 @@ var Font = (function FontClosure() {
|
|||||||
return names;
|
return names;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
var TTOpsStackDeltas = [
|
var TTOpsStackDeltas = [
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5,
|
0, 0, 0, 0, 0, 0, 0, 0, -2, -2, -2, -2, 0, 0, -2, -5,
|
||||||
-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1,
|
-1, -1, -1, -1, -1, -1, -1, -1, 0, 0, -1, 0, -1, -1, -1, -1,
|
||||||
|
@ -73,6 +73,7 @@ var Jbig2Image = (function Jbig2ImageClosure() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var sign = readBits(1);
|
var sign = readBits(1);
|
||||||
|
// prettier-ignore
|
||||||
var value = readBits(1) ?
|
var value = readBits(1) ?
|
||||||
(readBits(1) ?
|
(readBits(1) ?
|
||||||
(readBits(1) ?
|
(readBits(1) ?
|
||||||
|
@ -45,6 +45,7 @@ class EOIMarkerError extends BaseException { }
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
var JpegImage = (function JpegImageClosure() {
|
var JpegImage = (function JpegImageClosure() {
|
||||||
|
// prettier-ignore
|
||||||
var dctZigZag = new Uint8Array([
|
var dctZigZag = new Uint8Array([
|
||||||
0,
|
0,
|
||||||
1, 8,
|
1, 8,
|
||||||
@ -1015,6 +1016,7 @@ var JpegImage = (function JpegImageClosure() {
|
|||||||
// inverting JPEG (CMYK) images if and only if the image data does *not*
|
// inverting JPEG (CMYK) images if and only if the image data does *not*
|
||||||
// come from a PDF file and no `decodeTransform` was passed by the user.
|
// come from a PDF file and no `decodeTransform` was passed by the user.
|
||||||
if (!isSourcePDF && numComponents === 4 && !transform) {
|
if (!isSourcePDF && numComponents === 4 && !transform) {
|
||||||
|
// prettier-ignore
|
||||||
transform = new Int32Array([
|
transform = new Int32Array([
|
||||||
-256, 255, -256, 255, -256, 255, -256, 255]);
|
-256, 255, -256, 255, -256, 255, -256, 255]);
|
||||||
}
|
}
|
||||||
|
@ -1616,16 +1616,19 @@ var JpxImage = (function JpxImageClosure() {
|
|||||||
// Table D-1
|
// Table D-1
|
||||||
// The index is binary presentation: 0dddvvhh, ddd - sum of Di (0..4),
|
// The index is binary presentation: 0dddvvhh, ddd - sum of Di (0..4),
|
||||||
// vv - sum of Vi (0..2), and hh - sum of Hi (0..2)
|
// vv - sum of Vi (0..2), and hh - sum of Hi (0..2)
|
||||||
|
// prettier-ignore
|
||||||
var LLAndLHContextsLabel = new Uint8Array([
|
var LLAndLHContextsLabel = new Uint8Array([
|
||||||
0, 5, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 1, 6, 8, 0, 3, 7, 8, 0, 4,
|
0, 5, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 1, 6, 8, 0, 3, 7, 8, 0, 4,
|
||||||
7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6,
|
7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6,
|
||||||
8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8
|
8, 0, 3, 7, 8, 0, 4, 7, 8, 0, 0, 0, 0, 0, 2, 6, 8, 0, 3, 7, 8, 0, 4, 7, 8
|
||||||
]);
|
]);
|
||||||
|
// prettier-ignore
|
||||||
var HLContextLabel = new Uint8Array([
|
var HLContextLabel = new Uint8Array([
|
||||||
0, 3, 4, 0, 5, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 1, 3, 4, 0, 6, 7, 7, 0, 8,
|
0, 3, 4, 0, 5, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 1, 3, 4, 0, 6, 7, 7, 0, 8,
|
||||||
8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3,
|
8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3,
|
||||||
4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8
|
4, 0, 6, 7, 7, 0, 8, 8, 8, 0, 0, 0, 0, 0, 2, 3, 4, 0, 6, 7, 7, 0, 8, 8, 8
|
||||||
]);
|
]);
|
||||||
|
// prettier-ignore
|
||||||
var HHContextLabel = new Uint8Array([
|
var HHContextLabel = new Uint8Array([
|
||||||
0, 1, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 3, 4, 5, 0, 4, 5, 5, 0, 5,
|
0, 1, 2, 0, 1, 2, 2, 0, 2, 2, 2, 0, 0, 0, 0, 0, 3, 4, 5, 0, 4, 5, 5, 0, 5,
|
||||||
5, 5, 0, 0, 0, 0, 0, 6, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 0, 0, 0, 0, 8, 8,
|
5, 5, 0, 0, 0, 0, 0, 6, 7, 7, 0, 7, 7, 7, 0, 7, 7, 7, 0, 0, 0, 0, 0, 8, 8,
|
||||||
|
@ -1377,6 +1377,7 @@ var XRef = (function XRefClosure() {
|
|||||||
const CHECK_CONTENT_LENGTH = 25;
|
const CHECK_CONTENT_LENGTH = 25;
|
||||||
|
|
||||||
var trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]);
|
var trailerBytes = new Uint8Array([116, 114, 97, 105, 108, 101, 114]);
|
||||||
|
// prettier-ignore
|
||||||
var startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114,
|
var startxrefBytes = new Uint8Array([115, 116, 97, 114, 116, 120, 114,
|
||||||
101, 102]);
|
101, 102]);
|
||||||
const objBytes = new Uint8Array([111, 98, 106]);
|
const objBytes = new Uint8Array([111, 98, 106]);
|
||||||
|
@ -565,6 +565,7 @@ class Parser {
|
|||||||
this.shift(); // 'stream'
|
this.shift(); // 'stream'
|
||||||
} else {
|
} else {
|
||||||
// Bad stream length, scanning for endstream command.
|
// Bad stream length, scanning for endstream command.
|
||||||
|
// prettier-ignore
|
||||||
const ENDSTREAM_SIGNATURE = new Uint8Array([
|
const ENDSTREAM_SIGNATURE = new Uint8Array([
|
||||||
0x65, 0x6E, 0x64, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6D]);
|
0x65, 0x6E, 0x64, 0x73, 0x74, 0x72, 0x65, 0x61, 0x6D]);
|
||||||
let actualLength = this._findStreamLength(startPos,
|
let actualLength = this._findStreamLength(startPos,
|
||||||
@ -724,6 +725,7 @@ class Parser {
|
|||||||
|
|
||||||
// A '1' in this array means the character is white space. A '1' or
|
// A '1' in this array means the character is white space. A '1' or
|
||||||
// '2' means the character ends a name or command.
|
// '2' means the character ends a name or command.
|
||||||
|
// prettier-ignore
|
||||||
const specialChars = [
|
const specialChars = [
|
||||||
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
|
1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 1, 1, 0, 0, // 0x
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 1x
|
||||||
|
@ -514,6 +514,7 @@ Shadings.Mesh = (function MeshClosure() {
|
|||||||
}
|
}
|
||||||
var tmp1, tmp2, tmp3, tmp4;
|
var tmp1, tmp2, tmp3, tmp4;
|
||||||
switch (f) {
|
switch (f) {
|
||||||
|
// prettier-ignore
|
||||||
case 0:
|
case 0:
|
||||||
ps[12] = pi + 3; ps[13] = pi + 4; ps[14] = pi + 5; ps[15] = pi + 6;
|
ps[12] = pi + 3; ps[13] = pi + 4; ps[14] = pi + 5; ps[15] = pi + 6;
|
||||||
ps[ 8] = pi + 2; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 7;
|
ps[ 8] = pi + 2; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 7;
|
||||||
@ -522,6 +523,7 @@ Shadings.Mesh = (function MeshClosure() {
|
|||||||
cs[2] = ci + 1; cs[3] = ci + 2;
|
cs[2] = ci + 1; cs[3] = ci + 2;
|
||||||
cs[0] = ci; cs[1] = ci + 3;
|
cs[0] = ci; cs[1] = ci + 3;
|
||||||
break;
|
break;
|
||||||
|
// prettier-ignore
|
||||||
case 1:
|
case 1:
|
||||||
tmp1 = ps[12]; tmp2 = ps[13]; tmp3 = ps[14]; tmp4 = ps[15];
|
tmp1 = ps[12]; tmp2 = ps[13]; tmp3 = ps[14]; tmp4 = ps[15];
|
||||||
ps[12] = tmp4; ps[13] = pi + 0; ps[14] = pi + 1; ps[15] = pi + 2;
|
ps[12] = tmp4; ps[13] = pi + 0; ps[14] = pi + 1; ps[15] = pi + 2;
|
||||||
@ -532,6 +534,7 @@ Shadings.Mesh = (function MeshClosure() {
|
|||||||
cs[2] = tmp2; cs[3] = ci;
|
cs[2] = tmp2; cs[3] = ci;
|
||||||
cs[0] = tmp1; cs[1] = ci + 1;
|
cs[0] = tmp1; cs[1] = ci + 1;
|
||||||
break;
|
break;
|
||||||
|
// prettier-ignore
|
||||||
case 2:
|
case 2:
|
||||||
tmp1 = ps[15];
|
tmp1 = ps[15];
|
||||||
tmp2 = ps[11];
|
tmp2 = ps[11];
|
||||||
@ -543,6 +546,7 @@ Shadings.Mesh = (function MeshClosure() {
|
|||||||
cs[2] = cs[1]; cs[3] = ci;
|
cs[2] = cs[1]; cs[3] = ci;
|
||||||
cs[0] = tmp1; cs[1] = ci + 1;
|
cs[0] = tmp1; cs[1] = ci + 1;
|
||||||
break;
|
break;
|
||||||
|
// prettier-ignore
|
||||||
case 3:
|
case 3:
|
||||||
ps[12] = ps[0]; ps[13] = pi + 0; ps[14] = pi + 1; ps[15] = pi + 2;
|
ps[12] = ps[0]; ps[13] = pi + 0; ps[14] = pi + 1; ps[15] = pi + 2;
|
||||||
ps[ 8] = ps[1]; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 3;
|
ps[ 8] = ps[1]; /* values for 5, 6, 9, 10 are */ ps[11] = pi + 3;
|
||||||
@ -626,6 +630,7 @@ Shadings.Mesh = (function MeshClosure() {
|
|||||||
}
|
}
|
||||||
var tmp1, tmp2, tmp3, tmp4;
|
var tmp1, tmp2, tmp3, tmp4;
|
||||||
switch (f) {
|
switch (f) {
|
||||||
|
// prettier-ignore
|
||||||
case 0:
|
case 0:
|
||||||
ps[12] = pi + 3; ps[13] = pi + 4; ps[14] = pi + 5; ps[15] = pi + 6;
|
ps[12] = pi + 3; ps[13] = pi + 4; ps[14] = pi + 5; ps[15] = pi + 6;
|
||||||
ps[ 8] = pi + 2; ps[ 9] = pi + 13; ps[10] = pi + 14; ps[11] = pi + 7;
|
ps[ 8] = pi + 2; ps[ 9] = pi + 13; ps[10] = pi + 14; ps[11] = pi + 7;
|
||||||
@ -634,6 +639,7 @@ Shadings.Mesh = (function MeshClosure() {
|
|||||||
cs[2] = ci + 1; cs[3] = ci + 2;
|
cs[2] = ci + 1; cs[3] = ci + 2;
|
||||||
cs[0] = ci; cs[1] = ci + 3;
|
cs[0] = ci; cs[1] = ci + 3;
|
||||||
break;
|
break;
|
||||||
|
// prettier-ignore
|
||||||
case 1:
|
case 1:
|
||||||
tmp1 = ps[12]; tmp2 = ps[13]; tmp3 = ps[14]; tmp4 = ps[15];
|
tmp1 = ps[12]; tmp2 = ps[13]; tmp3 = ps[14]; tmp4 = ps[15];
|
||||||
ps[12] = tmp4; ps[13] = pi + 0; ps[14] = pi + 1; ps[15] = pi + 2;
|
ps[12] = tmp4; ps[13] = pi + 0; ps[14] = pi + 1; ps[15] = pi + 2;
|
||||||
@ -644,6 +650,7 @@ Shadings.Mesh = (function MeshClosure() {
|
|||||||
cs[2] = tmp2; cs[3] = ci;
|
cs[2] = tmp2; cs[3] = ci;
|
||||||
cs[0] = tmp1; cs[1] = ci + 1;
|
cs[0] = tmp1; cs[1] = ci + 1;
|
||||||
break;
|
break;
|
||||||
|
// prettier-ignore
|
||||||
case 2:
|
case 2:
|
||||||
tmp1 = ps[15];
|
tmp1 = ps[15];
|
||||||
tmp2 = ps[11];
|
tmp2 = ps[11];
|
||||||
@ -655,6 +662,7 @@ Shadings.Mesh = (function MeshClosure() {
|
|||||||
cs[2] = cs[1]; cs[3] = ci;
|
cs[2] = cs[1]; cs[3] = ci;
|
||||||
cs[0] = tmp1; cs[1] = ci + 1;
|
cs[0] = tmp1; cs[1] = ci + 1;
|
||||||
break;
|
break;
|
||||||
|
// prettier-ignore
|
||||||
case 3:
|
case 3:
|
||||||
ps[12] = ps[0]; ps[13] = pi + 0; ps[14] = pi + 1; ps[15] = pi + 2;
|
ps[12] = ps[0]; ps[13] = pi + 0; ps[14] = pi + 1; ps[15] = pi + 2;
|
||||||
ps[ 8] = ps[1]; ps[ 9] = pi + 9; ps[10] = pi + 10; ps[11] = pi + 3;
|
ps[ 8] = ps[1]; ps[ 9] = pi + 9; ps[10] = pi + 10; ps[11] = pi + 3;
|
||||||
|
@ -330,10 +330,12 @@ var StreamsSequenceStream = (function StreamsSequenceStreamClosure() {
|
|||||||
})();
|
})();
|
||||||
|
|
||||||
var FlateStream = (function FlateStreamClosure() {
|
var FlateStream = (function FlateStreamClosure() {
|
||||||
|
// prettier-ignore
|
||||||
var codeLenCodeMap = new Int32Array([
|
var codeLenCodeMap = new Int32Array([
|
||||||
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
|
16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
var lengthDecode = new Int32Array([
|
var lengthDecode = new Int32Array([
|
||||||
0x00003, 0x00004, 0x00005, 0x00006, 0x00007, 0x00008, 0x00009, 0x0000a,
|
0x00003, 0x00004, 0x00005, 0x00006, 0x00007, 0x00008, 0x00009, 0x0000a,
|
||||||
0x1000b, 0x1000d, 0x1000f, 0x10011, 0x20013, 0x20017, 0x2001b, 0x2001f,
|
0x1000b, 0x1000d, 0x1000f, 0x10011, 0x20013, 0x20017, 0x2001b, 0x2001f,
|
||||||
@ -341,6 +343,7 @@ var FlateStream = (function FlateStreamClosure() {
|
|||||||
0x50083, 0x500a3, 0x500c3, 0x500e3, 0x00102, 0x00102, 0x00102
|
0x50083, 0x500a3, 0x500c3, 0x500e3, 0x00102, 0x00102, 0x00102
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
var distDecode = new Int32Array([
|
var distDecode = new Int32Array([
|
||||||
0x00001, 0x00002, 0x00003, 0x00004, 0x10005, 0x10007, 0x20009, 0x2000d,
|
0x00001, 0x00002, 0x00003, 0x00004, 0x10005, 0x10007, 0x20009, 0x2000d,
|
||||||
0x30011, 0x30019, 0x40021, 0x40031, 0x50041, 0x50061, 0x60081, 0x600c1,
|
0x30011, 0x30019, 0x40021, 0x40031, 0x50041, 0x50061, 0x60081, 0x600c1,
|
||||||
@ -348,6 +351,7 @@ var FlateStream = (function FlateStreamClosure() {
|
|||||||
0xb1001, 0xb1801, 0xc2001, 0xc3001, 0xd4001, 0xd6001
|
0xb1001, 0xb1801, 0xc2001, 0xc3001, 0xd4001, 0xd6001
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
var fixedLitCodeTab = [new Int32Array([
|
var fixedLitCodeTab = [new Int32Array([
|
||||||
0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c0,
|
0x70100, 0x80050, 0x80010, 0x80118, 0x70110, 0x80070, 0x80030, 0x900c0,
|
||||||
0x70108, 0x80060, 0x80020, 0x900a0, 0x80000, 0x80080, 0x80040, 0x900e0,
|
0x70108, 0x80060, 0x80020, 0x900a0, 0x80000, 0x80080, 0x80040, 0x900e0,
|
||||||
@ -415,6 +419,7 @@ var FlateStream = (function FlateStreamClosure() {
|
|||||||
0x7010f, 0x8006f, 0x8002f, 0x900bf, 0x8000f, 0x8008f, 0x8004f, 0x900ff
|
0x7010f, 0x8006f, 0x8002f, 0x900bf, 0x8000f, 0x8008f, 0x8004f, 0x900ff
|
||||||
]), 9];
|
]), 9];
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
var fixedDistCodeTab = [new Int32Array([
|
var fixedDistCodeTab = [new Int32Array([
|
||||||
0x50000, 0x50010, 0x50008, 0x50018, 0x50004, 0x50014, 0x5000c, 0x5001c,
|
0x50000, 0x50010, 0x50008, 0x50018, 0x50004, 0x50014, 0x5000c, 0x5001c,
|
||||||
0x50002, 0x50012, 0x5000a, 0x5001a, 0x50006, 0x50016, 0x5000e, 0x00000,
|
0x50002, 0x50012, 0x5000a, 0x5001a, 0x50006, 0x50016, 0x5000e, 0x00000,
|
||||||
|
@ -198,6 +198,7 @@ function compileType3Glyph(imgData) {
|
|||||||
var width = imgData.width, height = imgData.height;
|
var width = imgData.width, height = imgData.height;
|
||||||
var i, j, j0, width1 = width + 1;
|
var i, j, j0, width1 = width + 1;
|
||||||
var points = new Uint8Array(width1 * (height + 1));
|
var points = new Uint8Array(width1 * (height + 1));
|
||||||
|
// prettier-ignore
|
||||||
var POINT_TYPES =
|
var POINT_TYPES =
|
||||||
new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);
|
new Uint8Array([0, 2, 4, 0, 1, 0, 5, 4, 8, 10, 0, 8, 0, 2, 1, 0]);
|
||||||
|
|
||||||
|
@ -178,6 +178,7 @@ var WebGLUtils = (function WebGLUtilsClosure() {
|
|||||||
// provide texture coordinates for the rectangle.
|
// provide texture coordinates for the rectangle.
|
||||||
var texCoordBuffer = gl.createBuffer();
|
var texCoordBuffer = gl.createBuffer();
|
||||||
gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer);
|
gl.bindBuffer(gl.ARRAY_BUFFER, texCoordBuffer);
|
||||||
|
// prettier-ignore
|
||||||
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
|
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
|
||||||
0.0, 0.0,
|
0.0, 0.0,
|
||||||
1.0, 0.0,
|
1.0, 0.0,
|
||||||
@ -223,6 +224,7 @@ var WebGLUtils = (function WebGLUtilsClosure() {
|
|||||||
// it (2 triangles)
|
// it (2 triangles)
|
||||||
var buffer = gl.createBuffer();
|
var buffer = gl.createBuffer();
|
||||||
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
|
gl.bindBuffer(gl.ARRAY_BUFFER, buffer);
|
||||||
|
// prettier-ignore
|
||||||
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
|
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([
|
||||||
0, 0,
|
0, 0,
|
||||||
width, 0,
|
width, 0,
|
||||||
|
@ -731,6 +731,7 @@ class Util {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
const PDFStringTranslateTable = [
|
const PDFStringTranslateTable = [
|
||||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
|
||||||
0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0,
|
0x2D8, 0x2C7, 0x2C6, 0x2D9, 0x2DD, 0x2DB, 0x2DA, 0x2DC, 0, 0, 0, 0, 0, 0, 0,
|
||||||
|
@ -120,6 +120,7 @@ describe('CFFParser', function() {
|
|||||||
|
|
||||||
it('ignores reserved commands in parseDict, and refuses to add privateDict ' +
|
it('ignores reserved commands in parseDict, and refuses to add privateDict ' +
|
||||||
'keys with invalid values (bug 1308536)', function () {
|
'keys with invalid values (bug 1308536)', function () {
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([
|
var bytes = new Uint8Array([
|
||||||
64, 39, 31, 30, 252, 114, 137, 115, 79, 30, 197, 119, 2, 99, 127, 6
|
64, 39, 31, 30, 252, 114, 137, 115, 79, 30, 197, 119, 2, 99, 127, 6
|
||||||
]);
|
]);
|
||||||
@ -137,6 +138,7 @@ describe('CFFParser', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('parses a CharString having cntrmask', function() {
|
it('parses a CharString having cntrmask', function() {
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0, 1, // count
|
var bytes = new Uint8Array([0, 1, // count
|
||||||
1, // offsetSize
|
1, // offsetSize
|
||||||
0, // offset[0]
|
0, // offset[0]
|
||||||
@ -167,6 +169,7 @@ describe('CFFParser', function() {
|
|||||||
/* seacAnalysisEnabled = */ true);
|
/* seacAnalysisEnabled = */ true);
|
||||||
parser.parse(); // cff
|
parser.parse(); // cff
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0, 1, // count
|
var bytes = new Uint8Array([0, 1, // count
|
||||||
1, // offsetSize
|
1, // offsetSize
|
||||||
0, // offset[0]
|
0, // offset[0]
|
||||||
@ -192,6 +195,7 @@ describe('CFFParser', function() {
|
|||||||
/* seacAnalysisEnabled = */ false);
|
/* seacAnalysisEnabled = */ false);
|
||||||
parser.parse(); // cff
|
parser.parse(); // cff
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0, 1, // count
|
var bytes = new Uint8Array([0, 1, // count
|
||||||
1, // offsetSize
|
1, // offsetSize
|
||||||
0, // offset[0]
|
0, // offset[0]
|
||||||
@ -208,6 +212,7 @@ describe('CFFParser', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('parses a CharString endchar no args', function() {
|
it('parses a CharString endchar no args', function() {
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0, 1, // count
|
var bytes = new Uint8Array([0, 1, // count
|
||||||
1, // offsetSize
|
1, // offsetSize
|
||||||
0, // offset[0]
|
0, // offset[0]
|
||||||
@ -230,6 +235,7 @@ describe('CFFParser', function() {
|
|||||||
|
|
||||||
it('parses charset format 0', function() {
|
it('parses charset format 0', function() {
|
||||||
// The first three bytes make the offset large enough to skip predefined.
|
// The first three bytes make the offset large enough to skip predefined.
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0x00, 0x00, 0x00,
|
var bytes = new Uint8Array([0x00, 0x00, 0x00,
|
||||||
0x00, // format
|
0x00, // format
|
||||||
0x00, 0x02 // sid/cid
|
0x00, 0x02 // sid/cid
|
||||||
@ -245,6 +251,7 @@ describe('CFFParser', function() {
|
|||||||
|
|
||||||
it('parses charset format 1', function() {
|
it('parses charset format 1', function() {
|
||||||
// The first three bytes make the offset large enough to skip predefined.
|
// The first three bytes make the offset large enough to skip predefined.
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0x00, 0x00, 0x00,
|
var bytes = new Uint8Array([0x00, 0x00, 0x00,
|
||||||
0x01, // format
|
0x01, // format
|
||||||
0x00, 0x08, // sid/cid start
|
0x00, 0x08, // sid/cid start
|
||||||
@ -262,6 +269,7 @@ describe('CFFParser', function() {
|
|||||||
it('parses charset format 2', function() {
|
it('parses charset format 2', function() {
|
||||||
// format 2 is the same as format 1 but the left is card16
|
// format 2 is the same as format 1 but the left is card16
|
||||||
// The first three bytes make the offset large enough to skip predefined.
|
// The first three bytes make the offset large enough to skip predefined.
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0x00, 0x00, 0x00,
|
var bytes = new Uint8Array([0x00, 0x00, 0x00,
|
||||||
0x02, // format
|
0x02, // format
|
||||||
0x00, 0x08, // sid/cid start
|
0x00, 0x08, // sid/cid start
|
||||||
@ -278,6 +286,7 @@ describe('CFFParser', function() {
|
|||||||
|
|
||||||
it('parses encoding format 0', function() {
|
it('parses encoding format 0', function() {
|
||||||
// The first two bytes make the offset large enough to skip predefined.
|
// The first two bytes make the offset large enough to skip predefined.
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0x00, 0x00,
|
var bytes = new Uint8Array([0x00, 0x00,
|
||||||
0x00, // format
|
0x00, // format
|
||||||
0x01, // count
|
0x01, // count
|
||||||
@ -290,6 +299,7 @@ describe('CFFParser', function() {
|
|||||||
|
|
||||||
it('parses encoding format 1', function() {
|
it('parses encoding format 1', function() {
|
||||||
// The first two bytes make the offset large enough to skip predefined.
|
// The first two bytes make the offset large enough to skip predefined.
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0x00, 0x00,
|
var bytes = new Uint8Array([0x00, 0x00,
|
||||||
0x01, // format
|
0x01, // format
|
||||||
0x01, // num ranges
|
0x01, // num ranges
|
||||||
@ -303,6 +313,7 @@ describe('CFFParser', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('parses fdselect format 0', function() {
|
it('parses fdselect format 0', function() {
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0x00, // format
|
var bytes = new Uint8Array([0x00, // format
|
||||||
0x00, // gid: 0 fd: 0
|
0x00, // gid: 0 fd: 0
|
||||||
0x01 // gid: 1 fd: 1
|
0x01 // gid: 1 fd: 1
|
||||||
@ -315,6 +326,7 @@ describe('CFFParser', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('parses fdselect format 3', function() {
|
it('parses fdselect format 3', function() {
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0x03, // format
|
var bytes = new Uint8Array([0x03, // format
|
||||||
0x00, 0x02, // range count
|
0x00, 0x02, // range count
|
||||||
0x00, 0x00, // first gid
|
0x00, 0x00, // first gid
|
||||||
@ -331,6 +343,7 @@ describe('CFFParser', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('parses invalid fdselect format 3 (bug 1146106)', function() {
|
it('parses invalid fdselect format 3 (bug 1146106)', function() {
|
||||||
|
// prettier-ignore
|
||||||
var bytes = new Uint8Array([0x03, // format
|
var bytes = new Uint8Array([0x03, // format
|
||||||
0x00, 0x02, // range count
|
0x00, 0x02, // range count
|
||||||
0x00, 0x01, // first gid (invalid)
|
0x00, 0x01, // first gid (invalid)
|
||||||
|
@ -57,6 +57,7 @@ describe('cmap', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('parses beginbfchar', function(done) {
|
it('parses beginbfchar', function(done) {
|
||||||
|
// prettier-ignore
|
||||||
var str = '2 beginbfchar\n' +
|
var str = '2 beginbfchar\n' +
|
||||||
'<03> <00>\n' +
|
'<03> <00>\n' +
|
||||||
'<04> <01>\n' +
|
'<04> <01>\n' +
|
||||||
@ -73,6 +74,7 @@ describe('cmap', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('parses beginbfrange with range', function(done) {
|
it('parses beginbfrange with range', function(done) {
|
||||||
|
// prettier-ignore
|
||||||
var str = '1 beginbfrange\n' +
|
var str = '1 beginbfrange\n' +
|
||||||
'<06> <0B> 0\n' +
|
'<06> <0B> 0\n' +
|
||||||
'endbfrange\n';
|
'endbfrange\n';
|
||||||
@ -89,6 +91,7 @@ describe('cmap', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('parses beginbfrange with array', function(done) {
|
it('parses beginbfrange with array', function(done) {
|
||||||
|
// prettier-ignore
|
||||||
var str = '1 beginbfrange\n' +
|
var str = '1 beginbfrange\n' +
|
||||||
'<0D> <12> [ 0 1 2 3 4 5 ]\n' +
|
'<0D> <12> [ 0 1 2 3 4 5 ]\n' +
|
||||||
'endbfrange\n';
|
'endbfrange\n';
|
||||||
@ -105,6 +108,7 @@ describe('cmap', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('parses begincidchar', function(done) {
|
it('parses begincidchar', function(done) {
|
||||||
|
// prettier-ignore
|
||||||
var str = '1 begincidchar\n' +
|
var str = '1 begincidchar\n' +
|
||||||
'<14> 0\n' +
|
'<14> 0\n' +
|
||||||
'endcidchar\n';
|
'endcidchar\n';
|
||||||
@ -119,6 +123,7 @@ describe('cmap', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('parses begincidrange', function(done) {
|
it('parses begincidrange', function(done) {
|
||||||
|
// prettier-ignore
|
||||||
var str = '1 begincidrange\n' +
|
var str = '1 begincidrange\n' +
|
||||||
'<0016> <001B> 0\n' +
|
'<0016> <001B> 0\n' +
|
||||||
'endcidrange\n';
|
'endcidrange\n';
|
||||||
@ -135,6 +140,7 @@ describe('cmap', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('decodes codespace ranges', function(done) {
|
it('decodes codespace ranges', function(done) {
|
||||||
|
// prettier-ignore
|
||||||
var str = '1 begincodespacerange\n' +
|
var str = '1 begincodespacerange\n' +
|
||||||
'<01> <02>\n' +
|
'<01> <02>\n' +
|
||||||
'<00000003> <00000004>\n' +
|
'<00000003> <00000004>\n' +
|
||||||
@ -155,6 +161,7 @@ describe('cmap', function() {
|
|||||||
});
|
});
|
||||||
});
|
});
|
||||||
it('decodes 4 byte codespace ranges', function(done) {
|
it('decodes 4 byte codespace ranges', function(done) {
|
||||||
|
// prettier-ignore
|
||||||
var str = '1 begincodespacerange\n' +
|
var str = '1 begincodespacerange\n' +
|
||||||
'<8EA1A1A1> <8EA1FEFE>\n' +
|
'<8EA1A1A1> <8EA1FEFE>\n' +
|
||||||
'endcodespacerange\n';
|
'endcodespacerange\n';
|
||||||
|
@ -62,6 +62,7 @@ describe('colorspace', function () {
|
|||||||
|
|
||||||
let testSrc = new Uint8Array([27, 125, 250, 131]);
|
let testSrc = new Uint8Array([27, 125, 250, 131]);
|
||||||
let testDest = new Uint8ClampedArray(4 * 4 * 3);
|
let testDest = new Uint8ClampedArray(4 * 4 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
27, 27, 27,
|
27, 27, 27,
|
||||||
27, 27, 27,
|
27, 27, 27,
|
||||||
@ -103,6 +104,7 @@ describe('colorspace', function () {
|
|||||||
|
|
||||||
let testSrc = new Uint8Array([27, 125, 250, 131]);
|
let testSrc = new Uint8Array([27, 125, 250, 131]);
|
||||||
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
27, 27, 27,
|
27, 27, 27,
|
||||||
27, 27, 27,
|
27, 27, 27,
|
||||||
@ -138,6 +140,7 @@ describe('colorspace', function () {
|
|||||||
});
|
});
|
||||||
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
let testSrc = new Uint8Array([
|
let testSrc = new Uint8Array([
|
||||||
27, 125, 250,
|
27, 125, 250,
|
||||||
131, 139, 140,
|
131, 139, 140,
|
||||||
@ -145,6 +148,7 @@ describe('colorspace', function () {
|
|||||||
21, 147, 255
|
21, 147, 255
|
||||||
]);
|
]);
|
||||||
let testDest = new Uint8ClampedArray(4 * 4 * 3);
|
let testDest = new Uint8ClampedArray(4 * 4 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
27, 125, 250,
|
27, 125, 250,
|
||||||
27, 125, 250,
|
27, 125, 250,
|
||||||
@ -184,6 +188,7 @@ describe('colorspace', function () {
|
|||||||
});
|
});
|
||||||
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
let testSrc = new Uint8Array([
|
let testSrc = new Uint8Array([
|
||||||
27, 125, 250,
|
27, 125, 250,
|
||||||
131, 139, 140,
|
131, 139, 140,
|
||||||
@ -191,6 +196,7 @@ describe('colorspace', function () {
|
|||||||
21, 147, 255
|
21, 147, 255
|
||||||
]);
|
]);
|
||||||
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
27, 125, 250,
|
27, 125, 250,
|
||||||
27, 125, 250,
|
27, 125, 250,
|
||||||
@ -226,6 +232,7 @@ describe('colorspace', function () {
|
|||||||
});
|
});
|
||||||
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
let testSrc = new Uint8Array([
|
let testSrc = new Uint8Array([
|
||||||
27, 125, 250, 128,
|
27, 125, 250, 128,
|
||||||
131, 139, 140, 45,
|
131, 139, 140, 45,
|
||||||
@ -233,6 +240,7 @@ describe('colorspace', function () {
|
|||||||
21, 147, 255, 69
|
21, 147, 255, 69
|
||||||
]);
|
]);
|
||||||
let testDest = new Uint8ClampedArray(4 * 4 * 3);
|
let testDest = new Uint8ClampedArray(4 * 4 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
135, 81, 18,
|
135, 81, 18,
|
||||||
135, 81, 18,
|
135, 81, 18,
|
||||||
@ -272,6 +280,7 @@ describe('colorspace', function () {
|
|||||||
});
|
});
|
||||||
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
let testSrc = new Uint8Array([
|
let testSrc = new Uint8Array([
|
||||||
27, 125, 250, 128,
|
27, 125, 250, 128,
|
||||||
131, 139, 140, 45,
|
131, 139, 140, 45,
|
||||||
@ -279,6 +288,7 @@ describe('colorspace', function () {
|
|||||||
21, 147, 255, 69
|
21, 147, 255, 69
|
||||||
]);
|
]);
|
||||||
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
135, 81, 18,
|
135, 81, 18,
|
||||||
135, 81, 18,
|
135, 81, 18,
|
||||||
@ -324,6 +334,7 @@ describe('colorspace', function () {
|
|||||||
|
|
||||||
let testSrc = new Uint8Array([27, 125, 250, 131]);
|
let testSrc = new Uint8Array([27, 125, 250, 131]);
|
||||||
let testDest = new Uint8ClampedArray(4 * 4 * 3);
|
let testDest = new Uint8ClampedArray(4 * 4 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
25, 25, 25,
|
25, 25, 25,
|
||||||
25, 25, 25,
|
25, 25, 25,
|
||||||
@ -375,6 +386,7 @@ describe('colorspace', function () {
|
|||||||
});
|
});
|
||||||
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
let testSrc = new Uint8Array([
|
let testSrc = new Uint8Array([
|
||||||
27, 125, 250,
|
27, 125, 250,
|
||||||
131, 139, 140,
|
131, 139, 140,
|
||||||
@ -382,6 +394,7 @@ describe('colorspace', function () {
|
|||||||
21, 147, 255
|
21, 147, 255
|
||||||
]);
|
]);
|
||||||
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
0, 238, 255,
|
0, 238, 255,
|
||||||
0, 238, 255,
|
0, 238, 255,
|
||||||
@ -425,6 +438,7 @@ describe('colorspace', function () {
|
|||||||
});
|
});
|
||||||
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
let colorSpace = ColorSpace.parse(cs, xref, res, pdfFunctionFactory);
|
||||||
|
|
||||||
|
// prettier-ignore
|
||||||
let testSrc = new Uint8Array([
|
let testSrc = new Uint8Array([
|
||||||
27, 25, 50,
|
27, 25, 50,
|
||||||
31, 19, 40,
|
31, 19, 40,
|
||||||
@ -432,6 +446,7 @@ describe('colorspace', function () {
|
|||||||
21, 47, 55
|
21, 47, 55
|
||||||
]);
|
]);
|
||||||
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
0, 49, 101,
|
0, 49, 101,
|
||||||
0, 49, 101,
|
0, 49, 101,
|
||||||
@ -456,6 +471,7 @@ describe('colorspace', function () {
|
|||||||
|
|
||||||
describe('IndexedCS', function () {
|
describe('IndexedCS', function () {
|
||||||
it('should handle the case when cs is an array', function () {
|
it('should handle the case when cs is an array', function () {
|
||||||
|
// prettier-ignore
|
||||||
let lookup = new Uint8Array([
|
let lookup = new Uint8Array([
|
||||||
23, 155, 35,
|
23, 155, 35,
|
||||||
147, 69, 93,
|
147, 69, 93,
|
||||||
@ -480,6 +496,7 @@ describe('colorspace', function () {
|
|||||||
|
|
||||||
let testSrc = new Uint8Array([2, 2, 0, 1]);
|
let testSrc = new Uint8Array([2, 2, 0, 1]);
|
||||||
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
255, 109, 70,
|
255, 109, 70,
|
||||||
255, 109, 70,
|
255, 109, 70,
|
||||||
@ -536,6 +553,7 @@ describe('colorspace', function () {
|
|||||||
|
|
||||||
let testSrc = new Uint8Array([27, 25, 50, 31]);
|
let testSrc = new Uint8Array([27, 25, 50, 31]);
|
||||||
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
let testDest = new Uint8ClampedArray(3 * 3 * 3);
|
||||||
|
// prettier-ignore
|
||||||
let expectedDest = new Uint8ClampedArray([
|
let expectedDest = new Uint8ClampedArray([
|
||||||
226, 242, 241,
|
226, 242, 241,
|
||||||
226, 242, 241,
|
226, 242, 241,
|
||||||
|
@ -334,6 +334,7 @@ describe('crypto', function() {
|
|||||||
alg = new PDF17();
|
alg = new PDF17();
|
||||||
password = new Uint8Array([117, 115, 101, 114]);
|
password = new Uint8Array([117, 115, 101, 114]);
|
||||||
userValidation = new Uint8Array([117, 169, 4, 32, 159, 101, 22, 220]);
|
userValidation = new Uint8Array([117, 169, 4, 32, 159, 101, 22, 220]);
|
||||||
|
// prettier-ignore
|
||||||
userPassword = new Uint8Array([131, 242, 143, 160, 87, 2, 138, 134, 79,
|
userPassword = new Uint8Array([131, 242, 143, 160, 87, 2, 138, 134, 79,
|
||||||
253, 189, 173, 224, 73, 144, 241, 190, 81,
|
253, 189, 173, 224, 73, 144, 241, 190, 81,
|
||||||
197, 15, 249, 105, 145, 151, 15, 194, 65,
|
197, 15, 249, 105, 145, 151, 15, 194, 65,
|
||||||
@ -347,10 +348,12 @@ describe('crypto', function() {
|
|||||||
alg = new PDF17();
|
alg = new PDF17();
|
||||||
password = new Uint8Array([111, 119, 110, 101, 114]);
|
password = new Uint8Array([111, 119, 110, 101, 114]);
|
||||||
ownerValidation = new Uint8Array([243, 118, 71, 153, 128, 17, 101, 62]);
|
ownerValidation = new Uint8Array([243, 118, 71, 153, 128, 17, 101, 62]);
|
||||||
|
// prettier-ignore
|
||||||
ownerPassword = new Uint8Array([60, 98, 137, 35, 51, 101, 200, 152, 210,
|
ownerPassword = new Uint8Array([60, 98, 137, 35, 51, 101, 200, 152, 210,
|
||||||
178, 226, 228, 134, 205, 163, 24, 204,
|
178, 226, 228, 134, 205, 163, 24, 204,
|
||||||
126, 177, 36, 106, 50, 36, 125, 210, 172,
|
126, 177, 36, 106, 50, 36, 125, 210, 172,
|
||||||
171, 120, 222, 108, 139, 115]);
|
171, 120, 222, 108, 139, 115]);
|
||||||
|
// prettier-ignore
|
||||||
uBytes = new Uint8Array([131, 242, 143, 160, 87, 2, 138, 134, 79, 253,
|
uBytes = new Uint8Array([131, 242, 143, 160, 87, 2, 138, 134, 79, 253,
|
||||||
189, 173, 224, 73, 144, 241, 190, 81, 197, 15,
|
189, 173, 224, 73, 144, 241, 190, 81, 197, 15,
|
||||||
249, 105, 145, 151, 15, 194, 65, 3, 1, 126, 187,
|
249, 105, 145, 151, 15, 194, 65, 3, 1, 126, 187,
|
||||||
@ -366,11 +369,13 @@ describe('crypto', function() {
|
|||||||
alg = new PDF17();
|
alg = new PDF17();
|
||||||
password = new Uint8Array([117, 115, 101, 114]);
|
password = new Uint8Array([117, 115, 101, 114]);
|
||||||
userKeySalt = new Uint8Array([168, 94, 215, 192, 100, 38, 188, 40]);
|
userKeySalt = new Uint8Array([168, 94, 215, 192, 100, 38, 188, 40]);
|
||||||
|
// prettier-ignore
|
||||||
userEncryption = new Uint8Array([35, 150, 195, 169, 245, 51, 51, 255,
|
userEncryption = new Uint8Array([35, 150, 195, 169, 245, 51, 51, 255,
|
||||||
158, 158, 33, 242, 231, 75, 125, 190,
|
158, 158, 33, 242, 231, 75, 125, 190,
|
||||||
25, 126, 172, 114, 195, 244, 137, 245,
|
25, 126, 172, 114, 195, 244, 137, 245,
|
||||||
234, 165, 42, 74, 60, 38, 17, 17]);
|
234, 165, 42, 74, 60, 38, 17, 17]);
|
||||||
result = alg.getUserKey(password, userKeySalt, userEncryption);
|
result = alg.getUserKey(password, userKeySalt, userEncryption);
|
||||||
|
// prettier-ignore
|
||||||
expected = new Uint8Array([63, 114, 136, 209, 87, 61, 12, 30, 249, 1,
|
expected = new Uint8Array([63, 114, 136, 209, 87, 61, 12, 30, 249, 1,
|
||||||
186, 144, 254, 248, 163, 153, 151, 51, 133,
|
186, 144, 254, 248, 163, 153, 151, 51, 133,
|
||||||
10, 80, 152, 206, 15, 72, 187, 231, 33, 224,
|
10, 80, 152, 206, 15, 72, 187, 231, 33, 224,
|
||||||
@ -384,16 +389,19 @@ describe('crypto', function() {
|
|||||||
alg = new PDF17();
|
alg = new PDF17();
|
||||||
password = new Uint8Array([111, 119, 110, 101, 114]);
|
password = new Uint8Array([111, 119, 110, 101, 114]);
|
||||||
ownerKeySalt = new Uint8Array([200, 245, 242, 12, 218, 123, 24, 120]);
|
ownerKeySalt = new Uint8Array([200, 245, 242, 12, 218, 123, 24, 120]);
|
||||||
|
// prettier-ignore
|
||||||
ownerEncryption = new Uint8Array([213, 202, 14, 189, 110, 76, 70, 191, 6,
|
ownerEncryption = new Uint8Array([213, 202, 14, 189, 110, 76, 70, 191, 6,
|
||||||
195, 10, 190, 157, 100, 144, 85, 8, 62,
|
195, 10, 190, 157, 100, 144, 85, 8, 62,
|
||||||
123, 178, 156, 229, 50, 40, 229, 216,
|
123, 178, 156, 229, 50, 40, 229, 216,
|
||||||
54, 222, 34, 38, 106, 223]);
|
54, 222, 34, 38, 106, 223]);
|
||||||
|
// prettier-ignore
|
||||||
uBytes = new Uint8Array([131, 242, 143, 160, 87, 2, 138, 134, 79, 253,
|
uBytes = new Uint8Array([131, 242, 143, 160, 87, 2, 138, 134, 79, 253,
|
||||||
189, 173, 224, 73, 144, 241, 190, 81, 197, 15,
|
189, 173, 224, 73, 144, 241, 190, 81, 197, 15,
|
||||||
249, 105, 145, 151, 15, 194, 65, 3, 1, 126, 187,
|
249, 105, 145, 151, 15, 194, 65, 3, 1, 126, 187,
|
||||||
221, 117, 169, 4, 32, 159, 101, 22, 220, 168,
|
221, 117, 169, 4, 32, 159, 101, 22, 220, 168,
|
||||||
94, 215, 192, 100, 38, 188, 40]);
|
94, 215, 192, 100, 38, 188, 40]);
|
||||||
result = alg.getOwnerKey(password, ownerKeySalt, uBytes, ownerEncryption);
|
result = alg.getOwnerKey(password, ownerKeySalt, uBytes, ownerEncryption);
|
||||||
|
// prettier-ignore
|
||||||
expected = new Uint8Array([63, 114, 136, 209, 87, 61, 12, 30, 249, 1,
|
expected = new Uint8Array([63, 114, 136, 209, 87, 61, 12, 30, 249, 1,
|
||||||
186, 144, 254, 248, 163, 153, 151, 51, 133,
|
186, 144, 254, 248, 163, 153, 151, 51, 133,
|
||||||
10, 80, 152, 206, 15, 72, 187, 231, 33, 224,
|
10, 80, 152, 206, 15, 72, 187, 231, 33, 224,
|
||||||
@ -408,6 +416,7 @@ describe('crypto', function() {
|
|||||||
alg = new PDF20();
|
alg = new PDF20();
|
||||||
password = new Uint8Array([117, 115, 101, 114]);
|
password = new Uint8Array([117, 115, 101, 114]);
|
||||||
userValidation = new Uint8Array([83, 245, 146, 101, 198, 247, 34, 198]);
|
userValidation = new Uint8Array([83, 245, 146, 101, 198, 247, 34, 198]);
|
||||||
|
// prettier-ignore
|
||||||
userPassword = new Uint8Array([94, 230, 205, 75, 166, 99, 250, 76, 219,
|
userPassword = new Uint8Array([94, 230, 205, 75, 166, 99, 250, 76, 219,
|
||||||
128, 17, 85, 57, 17, 33, 164, 150, 46,
|
128, 17, 85, 57, 17, 33, 164, 150, 46,
|
||||||
103, 176, 160, 156, 187, 233, 166, 223,
|
103, 176, 160, 156, 187, 233, 166, 223,
|
||||||
@ -421,10 +430,12 @@ describe('crypto', function() {
|
|||||||
alg = new PDF20();
|
alg = new PDF20();
|
||||||
password = new Uint8Array([111, 119, 110, 101, 114]);
|
password = new Uint8Array([111, 119, 110, 101, 114]);
|
||||||
ownerValidation = new Uint8Array([142, 232, 169, 208, 202, 214, 5, 185]);
|
ownerValidation = new Uint8Array([142, 232, 169, 208, 202, 214, 5, 185]);
|
||||||
|
// prettier-ignore
|
||||||
ownerPassword = new Uint8Array([88, 232, 62, 54, 245, 26, 245, 209, 137,
|
ownerPassword = new Uint8Array([88, 232, 62, 54, 245, 26, 245, 209, 137,
|
||||||
123, 221, 72, 199, 49, 37, 217, 31, 74,
|
123, 221, 72, 199, 49, 37, 217, 31, 74,
|
||||||
115, 167, 127, 158, 176, 77, 45, 163, 87,
|
115, 167, 127, 158, 176, 77, 45, 163, 87,
|
||||||
47, 39, 90, 217, 141]);
|
47, 39, 90, 217, 141]);
|
||||||
|
// prettier-ignore
|
||||||
uBytes = new Uint8Array([94, 230, 205, 75, 166, 99, 250, 76, 219, 128,
|
uBytes = new Uint8Array([94, 230, 205, 75, 166, 99, 250, 76, 219, 128,
|
||||||
17, 85, 57, 17, 33, 164, 150, 46, 103, 176, 160,
|
17, 85, 57, 17, 33, 164, 150, 46, 103, 176, 160,
|
||||||
156, 187, 233, 166, 223, 163, 253, 147, 235, 95,
|
156, 187, 233, 166, 223, 163, 253, 147, 235, 95,
|
||||||
@ -440,11 +451,13 @@ describe('crypto', function() {
|
|||||||
alg = new PDF20();
|
alg = new PDF20();
|
||||||
password = new Uint8Array([117, 115, 101, 114]);
|
password = new Uint8Array([117, 115, 101, 114]);
|
||||||
userKeySalt = new Uint8Array([191, 11, 16, 94, 237, 216, 20, 175]);
|
userKeySalt = new Uint8Array([191, 11, 16, 94, 237, 216, 20, 175]);
|
||||||
|
// prettier-ignore
|
||||||
userEncryption = new Uint8Array([121, 208, 2, 181, 230, 89, 156, 60, 253,
|
userEncryption = new Uint8Array([121, 208, 2, 181, 230, 89, 156, 60, 253,
|
||||||
143, 212, 28, 84, 180, 196, 177, 173,
|
143, 212, 28, 84, 180, 196, 177, 173,
|
||||||
128, 221, 107, 46, 20, 94, 186, 135, 51,
|
128, 221, 107, 46, 20, 94, 186, 135, 51,
|
||||||
95, 24, 20, 223, 254, 36]);
|
95, 24, 20, 223, 254, 36]);
|
||||||
result = alg.getUserKey(password, userKeySalt, userEncryption);
|
result = alg.getUserKey(password, userKeySalt, userEncryption);
|
||||||
|
// prettier-ignore
|
||||||
expected = new Uint8Array([42, 218, 213, 39, 73, 91, 72, 79, 67, 38, 248,
|
expected = new Uint8Array([42, 218, 213, 39, 73, 91, 72, 79, 67, 38, 248,
|
||||||
133, 18, 189, 61, 34, 107, 79, 29, 56, 59,
|
133, 18, 189, 61, 34, 107, 79, 29, 56, 59,
|
||||||
181, 213, 118, 113, 34, 65, 210, 87, 174, 22,
|
181, 213, 118, 113, 34, 65, 210, 87, 174, 22,
|
||||||
@ -458,16 +471,19 @@ describe('crypto', function() {
|
|||||||
alg = new PDF20();
|
alg = new PDF20();
|
||||||
password = new Uint8Array([111, 119, 110, 101, 114]);
|
password = new Uint8Array([111, 119, 110, 101, 114]);
|
||||||
ownerKeySalt = new Uint8Array([29, 208, 185, 46, 11, 76, 135, 149]);
|
ownerKeySalt = new Uint8Array([29, 208, 185, 46, 11, 76, 135, 149]);
|
||||||
|
// prettier-ignore
|
||||||
ownerEncryption = new Uint8Array([209, 73, 224, 77, 103, 155, 201, 181,
|
ownerEncryption = new Uint8Array([209, 73, 224, 77, 103, 155, 201, 181,
|
||||||
190, 68, 223, 20, 62, 90, 56, 210, 5,
|
190, 68, 223, 20, 62, 90, 56, 210, 5,
|
||||||
240, 178, 128, 238, 124, 68, 254, 253,
|
240, 178, 128, 238, 124, 68, 254, 253,
|
||||||
244, 62, 108, 208, 135, 10, 251]);
|
244, 62, 108, 208, 135, 10, 251]);
|
||||||
|
// prettier-ignore
|
||||||
uBytes = new Uint8Array([94, 230, 205, 75, 166, 99, 250, 76, 219, 128,
|
uBytes = new Uint8Array([94, 230, 205, 75, 166, 99, 250, 76, 219, 128,
|
||||||
17, 85, 57, 17, 33, 164, 150, 46, 103, 176, 160,
|
17, 85, 57, 17, 33, 164, 150, 46, 103, 176, 160,
|
||||||
156, 187, 233, 166, 223, 163, 253, 147, 235, 95,
|
156, 187, 233, 166, 223, 163, 253, 147, 235, 95,
|
||||||
184, 83, 245, 146, 101, 198, 247, 34, 198, 191,
|
184, 83, 245, 146, 101, 198, 247, 34, 198, 191,
|
||||||
11, 16, 94, 237, 216, 20, 175]);
|
11, 16, 94, 237, 216, 20, 175]);
|
||||||
result = alg.getOwnerKey(password, ownerKeySalt, uBytes, ownerEncryption);
|
result = alg.getOwnerKey(password, ownerKeySalt, uBytes, ownerEncryption);
|
||||||
|
// prettier-ignore
|
||||||
expected = new Uint8Array([42, 218, 213, 39, 73, 91, 72, 79, 67, 38, 248,
|
expected = new Uint8Array([42, 218, 213, 39, 73, 91, 72, 79, 67, 38, 248,
|
||||||
133, 18, 189, 61, 34, 107, 79, 29, 56, 59,
|
133, 18, 189, 61, 34, 107, 79, 29, 56, 59,
|
||||||
181, 213, 118, 113, 34, 65, 210, 87, 174, 22,
|
181, 213, 118, 113, 34, 65, 210, 87, 174, 22,
|
||||||
|
@ -214,6 +214,7 @@ describe('parser', function() {
|
|||||||
describe('Linearization', function() {
|
describe('Linearization', function() {
|
||||||
it('should not find a linearization dictionary', function() {
|
it('should not find a linearization dictionary', function() {
|
||||||
// Not an actual linearization dictionary.
|
// Not an actual linearization dictionary.
|
||||||
|
// prettier-ignore
|
||||||
const stream1 = new StringStream(
|
const stream1 = new StringStream(
|
||||||
'3 0 obj\n' +
|
'3 0 obj\n' +
|
||||||
'<<\n' +
|
'<<\n' +
|
||||||
@ -225,6 +226,7 @@ describe('parser', function() {
|
|||||||
expect(Linearization.create(stream1)).toEqual(null);
|
expect(Linearization.create(stream1)).toEqual(null);
|
||||||
|
|
||||||
// Linearization dictionary with invalid version number.
|
// Linearization dictionary with invalid version number.
|
||||||
|
// prettier-ignore
|
||||||
const stream2 = new StringStream(
|
const stream2 = new StringStream(
|
||||||
'1 0 obj\n' +
|
'1 0 obj\n' +
|
||||||
'<<\n' +
|
'<<\n' +
|
||||||
@ -236,6 +238,7 @@ describe('parser', function() {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it('should accept a valid linearization dictionary', function() {
|
it('should accept a valid linearization dictionary', function() {
|
||||||
|
// prettier-ignore
|
||||||
const stream = new StringStream(
|
const stream = new StringStream(
|
||||||
'131 0 obj\n' +
|
'131 0 obj\n' +
|
||||||
'<<\n' +
|
'<<\n' +
|
||||||
@ -264,6 +267,7 @@ describe('parser', function() {
|
|||||||
it('should reject a linearization dictionary with invalid ' +
|
it('should reject a linearization dictionary with invalid ' +
|
||||||
'integer parameters', function() {
|
'integer parameters', function() {
|
||||||
// The /L parameter should be equal to the stream length.
|
// The /L parameter should be equal to the stream length.
|
||||||
|
// prettier-ignore
|
||||||
const stream1 = new StringStream(
|
const stream1 = new StringStream(
|
||||||
'1 0 obj\n' +
|
'1 0 obj\n' +
|
||||||
'<<\n' +
|
'<<\n' +
|
||||||
@ -283,6 +287,7 @@ describe('parser', function() {
|
|||||||
'dictionary does not equal the stream length.'));
|
'dictionary does not equal the stream length.'));
|
||||||
|
|
||||||
// The /E parameter should not be zero.
|
// The /E parameter should not be zero.
|
||||||
|
// prettier-ignore
|
||||||
const stream2 = new StringStream(
|
const stream2 = new StringStream(
|
||||||
'1 0 obj\n' +
|
'1 0 obj\n' +
|
||||||
'<<\n' +
|
'<<\n' +
|
||||||
@ -302,6 +307,7 @@ describe('parser', function() {
|
|||||||
'dictionary is invalid.'));
|
'dictionary is invalid.'));
|
||||||
|
|
||||||
// The /O parameter should be an integer.
|
// The /O parameter should be an integer.
|
||||||
|
// prettier-ignore
|
||||||
const stream3 = new StringStream(
|
const stream3 = new StringStream(
|
||||||
'1 0 obj\n' +
|
'1 0 obj\n' +
|
||||||
'<<\n' +
|
'<<\n' +
|
||||||
@ -324,6 +330,7 @@ describe('parser', function() {
|
|||||||
it('should reject a linearization dictionary with invalid hint parameters',
|
it('should reject a linearization dictionary with invalid hint parameters',
|
||||||
function() {
|
function() {
|
||||||
// The /H parameter should be an array.
|
// The /H parameter should be an array.
|
||||||
|
// prettier-ignore
|
||||||
const stream1 = new StringStream(
|
const stream1 = new StringStream(
|
||||||
'1 0 obj\n' +
|
'1 0 obj\n' +
|
||||||
'<<\n' +
|
'<<\n' +
|
||||||
@ -343,6 +350,7 @@ describe('parser', function() {
|
|||||||
'is invalid.'));
|
'is invalid.'));
|
||||||
|
|
||||||
// The hint array should contain two, or four, elements.
|
// The hint array should contain two, or four, elements.
|
||||||
|
// prettier-ignore
|
||||||
const stream2 = new StringStream(
|
const stream2 = new StringStream(
|
||||||
'1 0 obj\n' +
|
'1 0 obj\n' +
|
||||||
'<<\n' +
|
'<<\n' +
|
||||||
@ -362,6 +370,7 @@ describe('parser', function() {
|
|||||||
'is invalid.'));
|
'is invalid.'));
|
||||||
|
|
||||||
// The hint array should not contain zero.
|
// The hint array should not contain zero.
|
||||||
|
// prettier-ignore
|
||||||
const stream3 = new StringStream(
|
const stream3 = new StringStream(
|
||||||
'1 0 obj\n' +
|
'1 0 obj\n' +
|
||||||
'<<\n' +
|
'<<\n' +
|
||||||
|
Loading…
Reference in New Issue
Block a user