@syncfusion/ej2-pdf 25.1.40 → 25.1.42
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/dist/ej2-pdf.umd.min.js +2 -2
- package/dist/ej2-pdf.umd.min.js.map +1 -1
- package/dist/es6/ej2-pdf.es2015.js +174 -46
- package/dist/es6/ej2-pdf.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf.es5.js +176 -45
- package/dist/es6/ej2-pdf.es5.js.map +1 -1
- package/dist/global/ej2-pdf.min.js +2 -2
- package/dist/global/ej2-pdf.min.js.map +1 -1
- package/dist/global/index.d.ts +1 -1
- package/package.json +5 -5
- package/src/pdf/core/import-export/json-document.d.ts +1 -0
- package/src/pdf/core/import-export/json-document.js +32 -8
- package/src/pdf/core/import-export/xfdf-document.js +2 -2
- package/src/pdf/core/pdf-cross-reference.d.ts +1 -0
- package/src/pdf/core/pdf-cross-reference.js +46 -3
- package/src/pdf/core/security/encryptor.js +10 -10
- package/src/pdf/core/utils.d.ts +20 -13
- package/src/pdf/core/utils.js +87 -23
|
@@ -11306,7 +11306,7 @@ class _XfdfDocument extends _ExportHelper {
|
|
|
11306
11306
|
this._document = document;
|
|
11307
11307
|
this._crossReference = document._crossReference;
|
|
11308
11308
|
this._isAnnotationExport = false;
|
|
11309
|
-
const xml = _bytesToString(data);
|
|
11309
|
+
const xml = _bytesToString(data, true);
|
|
11310
11310
|
this._xmlDocument = (new DOMParser()).parseFromString(xml, 'text/xml');
|
|
11311
11311
|
this._isAnnotationImport = true;
|
|
11312
11312
|
this._readXmlData(this._xmlDocument.documentElement);
|
|
@@ -11315,7 +11315,7 @@ class _XfdfDocument extends _ExportHelper {
|
|
|
11315
11315
|
this._document = document;
|
|
11316
11316
|
this._crossReference = document._crossReference;
|
|
11317
11317
|
this._isAnnotationExport = false;
|
|
11318
|
-
this._xmlDocument = (new DOMParser()).parseFromString(_bytesToString(data), 'text/xml');
|
|
11318
|
+
this._xmlDocument = (new DOMParser()).parseFromString(_bytesToString(data, true), 'text/xml');
|
|
11319
11319
|
this._readXmlData(this._xmlDocument.documentElement);
|
|
11320
11320
|
}
|
|
11321
11321
|
_readXmlData(root) {
|
|
@@ -12591,6 +12591,7 @@ class _JsonDocument extends _ExportHelper {
|
|
|
12591
12591
|
constructor(fileName) {
|
|
12592
12592
|
super();
|
|
12593
12593
|
this._isImport = false;
|
|
12594
|
+
this._isColorSpace = false;
|
|
12594
12595
|
if (fileName !== null && typeof fileName !== 'undefined') {
|
|
12595
12596
|
this._fileName = fileName;
|
|
12596
12597
|
}
|
|
@@ -12636,9 +12637,7 @@ class _JsonDocument extends _ExportHelper {
|
|
|
12636
12637
|
if (typeof value === 'string' || (Array.isArray(value) && value.length === 1)) {
|
|
12637
12638
|
value = this._getValidString(typeof value === 'string' ? value : value[0]);
|
|
12638
12639
|
this._jsonData.push(this._doubleQuotes, this._colon, this._doubleQuotes);
|
|
12639
|
-
|
|
12640
|
-
this._jsonData.push(value.charCodeAt(i));
|
|
12641
|
-
}
|
|
12640
|
+
this._jsonData = _stringToBytes(value, true, false, this._jsonData);
|
|
12642
12641
|
this._jsonData.push(this._doubleQuotes);
|
|
12643
12642
|
}
|
|
12644
12643
|
else {
|
|
@@ -12670,7 +12669,7 @@ class _JsonDocument extends _ExportHelper {
|
|
|
12670
12669
|
const page = document.getPage(i);
|
|
12671
12670
|
if (page && page.annotations.count > 0) {
|
|
12672
12671
|
this._jsonData.push(i !== 0 && isAnnotationAdded ? this._comma : this._space, this._doubleQuotes);
|
|
12673
|
-
const pageNumber =
|
|
12672
|
+
const pageNumber = _stringToBytes(i.toString(), true, false, []);
|
|
12674
12673
|
pageNumber.forEach((entry) => {
|
|
12675
12674
|
this._jsonData.push(entry);
|
|
12676
12675
|
});
|
|
@@ -12686,7 +12685,7 @@ class _JsonDocument extends _ExportHelper {
|
|
|
12686
12685
|
}
|
|
12687
12686
|
count++;
|
|
12688
12687
|
this._exportAnnotation(annotation, i);
|
|
12689
|
-
this._jsonData =
|
|
12688
|
+
this._jsonData = _stringToBytes(this._convertToJson(this._table), true, false, this._jsonData);
|
|
12690
12689
|
this._table.clear();
|
|
12691
12690
|
}
|
|
12692
12691
|
}
|
|
@@ -13175,11 +13174,25 @@ class _JsonDocument extends _ExportHelper {
|
|
|
13175
13174
|
}
|
|
13176
13175
|
else if (Array.isArray(value)) {
|
|
13177
13176
|
const list = [];
|
|
13177
|
+
if (key === 'ColorSpace') {
|
|
13178
|
+
value.forEach(element => {
|
|
13179
|
+
if (typeof element === 'string') {
|
|
13180
|
+
this._isColorSpace = true;
|
|
13181
|
+
}
|
|
13182
|
+
});
|
|
13183
|
+
}
|
|
13178
13184
|
this._writeArray(list, value, dictionary);
|
|
13185
|
+
this._isColorSpace = false;
|
|
13179
13186
|
this._writeTable('array', this._convertToJsonArray(list), table, key, array);
|
|
13180
13187
|
}
|
|
13181
13188
|
else if (typeof value === 'string') {
|
|
13182
|
-
this.
|
|
13189
|
+
if (this._isColorSpace) {
|
|
13190
|
+
const bytes = _stringToBytes(value);
|
|
13191
|
+
this._writeTable('unicodeData', _byteArrayToHexString(bytes), table, key, array);
|
|
13192
|
+
}
|
|
13193
|
+
else {
|
|
13194
|
+
this._writeTable('string', value, table, key, array);
|
|
13195
|
+
}
|
|
13183
13196
|
}
|
|
13184
13197
|
else if (typeof value === 'number') {
|
|
13185
13198
|
this._writeTable(Number.isInteger(value) ? 'int' : 'fixed', value.toString(), table, key, array);
|
|
@@ -13206,6 +13219,13 @@ class _JsonDocument extends _ExportHelper {
|
|
|
13206
13219
|
const stream = baseStream.stream;
|
|
13207
13220
|
data = baseStream.getString(true, stream.getByteRange(stream.start, stream.end));
|
|
13208
13221
|
}
|
|
13222
|
+
else if (baseStream.stream && baseStream.stream.stream) {
|
|
13223
|
+
const flateStream = baseStream.stream; // eslint-disable-line
|
|
13224
|
+
if (flateStream.stream && flateStream.stream instanceof _PdfStream) {
|
|
13225
|
+
const stream = flateStream.stream;
|
|
13226
|
+
data = flateStream.getString(true, stream.getByteRange(stream.start, stream.end));
|
|
13227
|
+
}
|
|
13228
|
+
}
|
|
13209
13229
|
else {
|
|
13210
13230
|
data = value.getString(true);
|
|
13211
13231
|
}
|
|
@@ -13294,7 +13314,7 @@ class _JsonDocument extends _ExportHelper {
|
|
|
13294
13314
|
_parseJson(document, data) {
|
|
13295
13315
|
this._document = document;
|
|
13296
13316
|
this._crossReference = document._crossReference;
|
|
13297
|
-
let stringData = _bytesToString(data);
|
|
13317
|
+
let stringData = _bytesToString(data, true);
|
|
13298
13318
|
if (stringData.startsWith('{') && !stringData.endsWith('}')) {
|
|
13299
13319
|
while (stringData.length > 0 && !stringData.endsWith('}')) {
|
|
13300
13320
|
stringData = stringData.substring(0, stringData.length - 1);
|
|
@@ -14041,6 +14061,9 @@ class _JsonDocument extends _ExportHelper {
|
|
|
14041
14061
|
stream.dictionary.objId = value.objectNumber + ' ' + value.generationNumber;
|
|
14042
14062
|
this._crossReference._cacheMap.set(value, stream);
|
|
14043
14063
|
}
|
|
14064
|
+
else if (keys.indexOf('unicodeData') !== -1) {
|
|
14065
|
+
value = _bytesToString(_hexStringToByteArray(element.unicodeData, false));
|
|
14066
|
+
}
|
|
14044
14067
|
else {
|
|
14045
14068
|
value = null;
|
|
14046
14069
|
}
|
|
@@ -39586,29 +39609,46 @@ function _stringToPdfString(value) {
|
|
|
39586
39609
|
*
|
|
39587
39610
|
* @private
|
|
39588
39611
|
* @param {string} value string value.
|
|
39589
|
-
* @param {boolean} isDirect Whether to return
|
|
39590
|
-
* @
|
|
39612
|
+
* @param {boolean} isDirect Whether to return a number[] or Uint8Array.
|
|
39613
|
+
* @param {boolean} isPassword Whether the string is a password.
|
|
39614
|
+
* @returns {number[] | Uint8Array} Byte array
|
|
39591
39615
|
*/
|
|
39592
|
-
function _stringToBytes(value, isDirect = false) {
|
|
39593
|
-
|
|
39594
|
-
|
|
39595
|
-
bytes
|
|
39616
|
+
function _stringToBytes(value, isDirect = false, isPassword = false, destination) {
|
|
39617
|
+
let bytes = [];
|
|
39618
|
+
if (destination) {
|
|
39619
|
+
bytes = destination;
|
|
39596
39620
|
}
|
|
39597
|
-
|
|
39598
|
-
|
|
39599
|
-
|
|
39600
|
-
|
|
39601
|
-
*
|
|
39602
|
-
* @private
|
|
39603
|
-
* @param {string} value string value.
|
|
39604
|
-
* @param {number[]} destination byte array.
|
|
39605
|
-
* @returns {number[]} Byte array
|
|
39606
|
-
*/
|
|
39607
|
-
function _convertStringToBytes(value, destination) {
|
|
39608
|
-
for (let i = 0; i < value.length; ++i) {
|
|
39609
|
-
destination.push(value.charCodeAt(i) & 0xff);
|
|
39621
|
+
if (isPassword) {
|
|
39622
|
+
for (let i = 0; i < value.length; i++) {
|
|
39623
|
+
bytes.push(value.charCodeAt(i));
|
|
39624
|
+
}
|
|
39610
39625
|
}
|
|
39611
|
-
|
|
39626
|
+
else {
|
|
39627
|
+
for (let i = 0; i < value.length; i++) {
|
|
39628
|
+
let charCode = value.charCodeAt(i);
|
|
39629
|
+
if (charCode < 0x80) {
|
|
39630
|
+
bytes.push(charCode);
|
|
39631
|
+
}
|
|
39632
|
+
else if (charCode < 0x800) {
|
|
39633
|
+
bytes.push((charCode >> 6) | 0xC0);
|
|
39634
|
+
bytes.push((charCode & 0x3F) | 0x80);
|
|
39635
|
+
}
|
|
39636
|
+
else if (charCode < 0xD800 || charCode >= 0xE000) {
|
|
39637
|
+
bytes.push((charCode >> 12) | 0xE0);
|
|
39638
|
+
bytes.push(((charCode >> 6) & 0x3F) | 0x80);
|
|
39639
|
+
bytes.push((charCode & 0x3F) | 0x80);
|
|
39640
|
+
}
|
|
39641
|
+
else {
|
|
39642
|
+
i++;
|
|
39643
|
+
charCode = 0x10000 + (((charCode & 0x3FF) << 10) | (value.charCodeAt(i) & 0x3FF));
|
|
39644
|
+
bytes.push((charCode >> 18) | 0xF0);
|
|
39645
|
+
bytes.push(((charCode >> 12) & 0x3F) | 0x80);
|
|
39646
|
+
bytes.push(((charCode >> 6) & 0x3F) | 0x80);
|
|
39647
|
+
bytes.push((charCode & 0x3F) | 0x80);
|
|
39648
|
+
}
|
|
39649
|
+
}
|
|
39650
|
+
}
|
|
39651
|
+
return isDirect ? bytes : new Uint8Array(bytes);
|
|
39612
39652
|
}
|
|
39613
39653
|
/**
|
|
39614
39654
|
* Check equal or not.
|
|
@@ -39670,20 +39710,48 @@ function _areNotEqual(value, current) {
|
|
|
39670
39710
|
* @param {Uint8Array} bytes Input data.
|
|
39671
39711
|
* @returns {string} String value processed from input bytes.
|
|
39672
39712
|
*/
|
|
39673
|
-
function _bytesToString(bytes) {
|
|
39713
|
+
function _bytesToString(bytes, isJson = false) {
|
|
39674
39714
|
const length = bytes.length;
|
|
39675
39715
|
const max = 8192;
|
|
39716
|
+
const stringBuffer = [];
|
|
39676
39717
|
if (length < max) {
|
|
39677
|
-
return String.fromCharCode.apply(null, bytes);
|
|
39718
|
+
return (isJson ? _decodeUTF8(bytes) : String.fromCharCode.apply(null, bytes));
|
|
39678
39719
|
}
|
|
39679
|
-
const stringBuffer = [];
|
|
39680
39720
|
for (let i = 0; i < length; i += max) {
|
|
39681
39721
|
const chunkEnd = Math.min(i + max, length);
|
|
39682
39722
|
const chunk = bytes.subarray(i, chunkEnd);
|
|
39683
|
-
stringBuffer.push(String.fromCharCode.apply(null, chunk));
|
|
39723
|
+
stringBuffer.push(isJson ? _decodeUTF8(chunk) : String.fromCharCode.apply(null, chunk));
|
|
39684
39724
|
}
|
|
39685
39725
|
return stringBuffer.join('');
|
|
39686
39726
|
}
|
|
39727
|
+
/**
|
|
39728
|
+
* Decode unicode string.
|
|
39729
|
+
*
|
|
39730
|
+
* @private
|
|
39731
|
+
* @param {Uint8Array} bytes Input data.
|
|
39732
|
+
* @returns {string} String value processed from input bytes.
|
|
39733
|
+
*/
|
|
39734
|
+
function _decodeUTF8(bytes) {
|
|
39735
|
+
let result = '';
|
|
39736
|
+
let i = 0;
|
|
39737
|
+
while (i < bytes.length) {
|
|
39738
|
+
const byte = bytes[i++];
|
|
39739
|
+
if (byte < 0x80) {
|
|
39740
|
+
result += String.fromCharCode(byte);
|
|
39741
|
+
}
|
|
39742
|
+
else if (byte < 0xE0) {
|
|
39743
|
+
result += String.fromCharCode(((byte & 0x1F) << 6) | (bytes[i++] & 0x3F));
|
|
39744
|
+
}
|
|
39745
|
+
else if (byte < 0xF0) {
|
|
39746
|
+
result += String.fromCharCode(((byte & 0x0F) << 12) | ((bytes[i++] & 0x3F) << 6) | (bytes[i++] & 0x3F));
|
|
39747
|
+
}
|
|
39748
|
+
else {
|
|
39749
|
+
const codePoint = ((byte & 0x07) << 18) | ((bytes[i++] & 0x3F) << 12) | ((bytes[i++] & 0x3F) << 6) | (bytes[i++] & 0x3F) - 0x10000;
|
|
39750
|
+
result += String.fromCharCode((codePoint >> 10) + 0xD800, (codePoint & 0x03FF) + 0xDC00);
|
|
39751
|
+
}
|
|
39752
|
+
}
|
|
39753
|
+
return result;
|
|
39754
|
+
}
|
|
39687
39755
|
/**
|
|
39688
39756
|
* Convert string to unicode array.
|
|
39689
39757
|
*
|
|
@@ -43290,6 +43358,23 @@ function _getSize(input) {
|
|
|
43290
43358
|
}
|
|
43291
43359
|
return size;
|
|
43292
43360
|
}
|
|
43361
|
+
/**
|
|
43362
|
+
* Convert the string to big endian bytes.
|
|
43363
|
+
*
|
|
43364
|
+
* @param {string} input string.
|
|
43365
|
+
* @returns {number[]} bytes.
|
|
43366
|
+
*/
|
|
43367
|
+
function _stringToBigEndianBytes(input) {
|
|
43368
|
+
const bytes = [];
|
|
43369
|
+
for (let i = 0; i < input.length; i++) {
|
|
43370
|
+
const charCode = input.charCodeAt(Number.parseInt(i.toString(), 10));
|
|
43371
|
+
if (charCode <= 0xFFFF) {
|
|
43372
|
+
bytes.push((charCode >> 8) & 0xFF);
|
|
43373
|
+
bytes.push(charCode & 0xFF);
|
|
43374
|
+
}
|
|
43375
|
+
}
|
|
43376
|
+
return bytes;
|
|
43377
|
+
}
|
|
43293
43378
|
|
|
43294
43379
|
/* eslint-disable */
|
|
43295
43380
|
let nameCache = Object.create(null);
|
|
@@ -46052,12 +46137,12 @@ class _PdfEncryptor {
|
|
|
46052
46137
|
if (!Number.isInteger(keyLength) || keyLength < 40 || keyLength % 8 !== 0) {
|
|
46053
46138
|
throw new FormatError('invalid key length');
|
|
46054
46139
|
}
|
|
46055
|
-
const ownerPassword = _stringToBytes(dictionary.get('O')).subarray(0, 32);
|
|
46056
|
-
const userPassword = _stringToBytes(dictionary.get('U')).subarray(0, 32);
|
|
46140
|
+
const ownerPassword = _stringToBytes(dictionary.get('O'), false, true).subarray(0, 32);
|
|
46141
|
+
const userPassword = _stringToBytes(dictionary.get('U'), false, true).subarray(0, 32);
|
|
46057
46142
|
const flag = dictionary.get('P');
|
|
46058
46143
|
const revision = dictionary.get('R');
|
|
46059
46144
|
this._encryptMetaData = (algorithm === 4 || algorithm === 5) && dictionary.get('EncryptMetadata') !== false;
|
|
46060
|
-
const fileIdBytes = _stringToBytes(id);
|
|
46145
|
+
const fileIdBytes = _stringToBytes(id, false, true);
|
|
46061
46146
|
let passwordBytes;
|
|
46062
46147
|
if (password) {
|
|
46063
46148
|
if (revision === 6) {
|
|
@@ -46080,15 +46165,15 @@ class _PdfEncryptor {
|
|
|
46080
46165
|
}
|
|
46081
46166
|
}
|
|
46082
46167
|
else {
|
|
46083
|
-
const ownerValidationKey = _stringToBytes(dictionary.get('O'));
|
|
46168
|
+
const ownerValidationKey = _stringToBytes(dictionary.get('O'), false, true);
|
|
46084
46169
|
const ownerValidationSalt = ownerValidationKey.subarray(32, 40);
|
|
46085
46170
|
const ownerKeySalt = ownerValidationKey.subarray(40, 48);
|
|
46086
|
-
const userValidationKey = _stringToBytes(dictionary.get('U'));
|
|
46171
|
+
const userValidationKey = _stringToBytes(dictionary.get('U'), false, true);
|
|
46087
46172
|
const uBytes = userValidationKey.subarray(0, 48);
|
|
46088
46173
|
const userValidationSalt = userValidationKey.subarray(32, 40);
|
|
46089
46174
|
const userKeySalt = userValidationKey.subarray(40, 48);
|
|
46090
|
-
const ownerEncryption = _stringToBytes(dictionary.get('OE'));
|
|
46091
|
-
const userEncryption = _stringToBytes(dictionary.get('UE'));
|
|
46175
|
+
const ownerEncryption = _stringToBytes(dictionary.get('OE'), false, true);
|
|
46176
|
+
const userEncryption = _stringToBytes(dictionary.get('UE'), false, true);
|
|
46092
46177
|
let algorithm;
|
|
46093
46178
|
if (revision === 6) {
|
|
46094
46179
|
algorithm = new _AdvancedEncryption();
|
|
@@ -47515,7 +47600,7 @@ class _CipherTransform {
|
|
|
47515
47600
|
return new _PdfDecryptStream(stream, length, this._streamCipher);
|
|
47516
47601
|
}
|
|
47517
47602
|
decryptString(s) {
|
|
47518
|
-
return _bytesToString(this._stringCipher._decryptBlock(_stringToBytes(s), true));
|
|
47603
|
+
return _bytesToString(this._stringCipher._decryptBlock(_stringToBytes(s, false, true), true));
|
|
47519
47604
|
}
|
|
47520
47605
|
encryptString(s) {
|
|
47521
47606
|
if (this._stringCipher instanceof _AdvancedEncryptionBaseCipher) {
|
|
@@ -47531,13 +47616,13 @@ class _CipherTransform {
|
|
|
47531
47616
|
iv[Number.parseInt(i.toString(), 10)] = Math.floor(256 * Math.random());
|
|
47532
47617
|
}
|
|
47533
47618
|
}
|
|
47534
|
-
const data = this._stringCipher._encrypt(_stringToBytes(s), iv);
|
|
47619
|
+
const data = this._stringCipher._encrypt(_stringToBytes(s, false, true), iv);
|
|
47535
47620
|
const buffer = new Uint8Array(16 + data.length);
|
|
47536
47621
|
buffer.set(iv);
|
|
47537
47622
|
buffer.set(data, 16);
|
|
47538
47623
|
return _bytesToString(buffer);
|
|
47539
47624
|
}
|
|
47540
|
-
return _bytesToString(this._stringCipher._encrypt(_stringToBytes(s)));
|
|
47625
|
+
return _bytesToString(this._stringCipher._encrypt(_stringToBytes(s, false, true)));
|
|
47541
47626
|
}
|
|
47542
47627
|
}
|
|
47543
47628
|
|
|
@@ -48275,7 +48360,7 @@ class _PdfCrossReference {
|
|
|
48275
48360
|
}
|
|
48276
48361
|
this._writeObject(archiveStream, buffer, archiveRef, cipher);
|
|
48277
48362
|
}
|
|
48278
|
-
const formatValue = Math.max(_getSize(this._stream.bytes.length), _getSize(this._nextReferenceNumber));
|
|
48363
|
+
const formatValue = Math.max(_getSize(this._stream.bytes.length + buffer.length), _getSize(this._nextReferenceNumber));
|
|
48279
48364
|
const newRef = this._getNextReference();
|
|
48280
48365
|
const newStartXref = currentLength + buffer.length;
|
|
48281
48366
|
const newXref = new _PdfDictionary(this);
|
|
@@ -48509,7 +48594,19 @@ class _PdfCrossReference {
|
|
|
48509
48594
|
if (!isCrossReference && transform) {
|
|
48510
48595
|
value = transform.encryptString(value);
|
|
48511
48596
|
}
|
|
48512
|
-
|
|
48597
|
+
let isUnicode = false;
|
|
48598
|
+
for (let i = 0; i < value.length; i++) {
|
|
48599
|
+
if (value.charCodeAt([i]) > 255) {
|
|
48600
|
+
isUnicode = true;
|
|
48601
|
+
break;
|
|
48602
|
+
}
|
|
48603
|
+
}
|
|
48604
|
+
if (isUnicode) {
|
|
48605
|
+
this._writeUnicodeString(value, buffer);
|
|
48606
|
+
}
|
|
48607
|
+
else {
|
|
48608
|
+
this._writeString(`(${this._escapeString(value)})`, buffer);
|
|
48609
|
+
}
|
|
48513
48610
|
}
|
|
48514
48611
|
else if (typeof value === 'number') {
|
|
48515
48612
|
this._writeString(_numberToString(value), buffer);
|
|
@@ -48527,6 +48624,37 @@ class _PdfCrossReference {
|
|
|
48527
48624
|
this._writeString('null', buffer);
|
|
48528
48625
|
}
|
|
48529
48626
|
}
|
|
48627
|
+
_writeUnicodeString(value, buffer) {
|
|
48628
|
+
const byteValues = _stringToBigEndianBytes(value);
|
|
48629
|
+
byteValues.unshift(254, 255);
|
|
48630
|
+
const data = [];
|
|
48631
|
+
for (let i = 0; i < byteValues.length; i++) {
|
|
48632
|
+
const byte = byteValues[Number.parseInt(i.toString(), 10)];
|
|
48633
|
+
switch (byte) {
|
|
48634
|
+
case 40:
|
|
48635
|
+
case 41:
|
|
48636
|
+
data.push(92);
|
|
48637
|
+
data.push(byte);
|
|
48638
|
+
break;
|
|
48639
|
+
case 13:
|
|
48640
|
+
data.push(92);
|
|
48641
|
+
data.push(114);
|
|
48642
|
+
break;
|
|
48643
|
+
case 92:
|
|
48644
|
+
data.push(92);
|
|
48645
|
+
data.push(byte);
|
|
48646
|
+
break;
|
|
48647
|
+
default:
|
|
48648
|
+
data.push(byte);
|
|
48649
|
+
break;
|
|
48650
|
+
}
|
|
48651
|
+
}
|
|
48652
|
+
buffer.push('('.charCodeAt(0) & 0xff);
|
|
48653
|
+
for (let i = 0; i < data.length; i++) {
|
|
48654
|
+
buffer.push(data[Number.parseInt(i.toString(), 10)] & 0xff);
|
|
48655
|
+
}
|
|
48656
|
+
buffer.push(')'.charCodeAt(0) & 0xff);
|
|
48657
|
+
}
|
|
48530
48658
|
_writeString(value, buffer) {
|
|
48531
48659
|
for (let i = 0; i < value.length; i++) {
|
|
48532
48660
|
buffer.push(value.charCodeAt(i) & 0xff);
|
|
@@ -52892,5 +53020,5 @@ class PdfBitmap extends PdfImage {
|
|
|
52892
53020
|
}
|
|
52893
53021
|
}
|
|
52894
53022
|
|
|
52895
|
-
export { _PdfBaseStream, _PdfStream, _PdfContentStream, _PdfNullStream, _ContentParser, _ContentLexer, _PdfRecord, _PdfDecodeStream, _PdfDecryptStream, PdfAnnotationFlag, PdfLineEndingStyle, PdfLineIntent, PdfLineCaptionType, PdfBorderStyle, PdfBorderEffectStyle, PdfRotationAngle, PdfCrossReferenceType, PdfHighlightMode, PdfTextAlignment, PdfFormFieldVisibility, PdfMeasurementUnit, PdfCircleMeasurementType, PdfRubberStampAnnotationIcon, PdfCheckBoxStyle, PdfTextMarkupAnnotationType, PdfPopupIcon, PdfAnnotationState, PdfAnnotationStateModel, PdfAttachmentIcon, PdfAnnotationIntent, PdfDestinationMode, DataFormat, PdfFormFieldsTabOrder, _PdfAnnotationType, _PdfGraphicsUnit, _FieldFlag, _SignatureFlag, _PdfCheckFieldState, PdfPermissionFlag, PdfPageOrientation, PdfTextDirection, PdfSubSuperScript, PdfBlendMode, PdfFillMode, PdfDashStyle, PdfLineCap, PdfLineJoin, _PdfWordWrapType, _FontDescriptorFlag, _TrueTypeCmapFormat, _TrueTypeCmapEncoding, _TrueTypePlatformID, _TrueTypeMicrosoftEncodingID, _TrueTypeMacintoshEncodingID, _TrueTypeCompositeGlyphFlag, _ImageFormat, _TokenType, PdfTextStyle, _PdfColorSpace, _PdfFlateStream, _PdfCatalog, _PdfCrossReference, PdfDocument, PdfAnnotationExportSettings, PdfFormFieldExportSettings, PdfPageSettings, PdfMargins, PdfFileStructure, PdfPage, PdfDestination, PdfBookmarkBase, PdfBookmark, PdfNamedDestination, _PdfNamedDestinationCollection, _PdfLexicalOperator, _PdfParser, _Linearization, _PdfName, _PdfCommand, _PdfReference, _PdfReferenceSet, _PdfReferenceSetCache, Dictionary, _PdfDictionary, _PdfNull, _clearPrimitiveCaches, _isName, _isCommand, PdfPredictorStream, _toUnsigned, _toSigned16, _toSigned32, _copyRange, _checkType, _getDecoder, _checkRotation, _getPageIndex, _annotationFlagsToString, _stringToAnnotationFlags, _stringToPdfString, _stringToBytes,
|
|
53023
|
+
export { _PdfBaseStream, _PdfStream, _PdfContentStream, _PdfNullStream, _ContentParser, _ContentLexer, _PdfRecord, _PdfDecodeStream, _PdfDecryptStream, PdfAnnotationFlag, PdfLineEndingStyle, PdfLineIntent, PdfLineCaptionType, PdfBorderStyle, PdfBorderEffectStyle, PdfRotationAngle, PdfCrossReferenceType, PdfHighlightMode, PdfTextAlignment, PdfFormFieldVisibility, PdfMeasurementUnit, PdfCircleMeasurementType, PdfRubberStampAnnotationIcon, PdfCheckBoxStyle, PdfTextMarkupAnnotationType, PdfPopupIcon, PdfAnnotationState, PdfAnnotationStateModel, PdfAttachmentIcon, PdfAnnotationIntent, PdfDestinationMode, DataFormat, PdfFormFieldsTabOrder, _PdfAnnotationType, _PdfGraphicsUnit, _FieldFlag, _SignatureFlag, _PdfCheckFieldState, PdfPermissionFlag, PdfPageOrientation, PdfTextDirection, PdfSubSuperScript, PdfBlendMode, PdfFillMode, PdfDashStyle, PdfLineCap, PdfLineJoin, _PdfWordWrapType, _FontDescriptorFlag, _TrueTypeCmapFormat, _TrueTypeCmapEncoding, _TrueTypePlatformID, _TrueTypeMicrosoftEncodingID, _TrueTypeMacintoshEncodingID, _TrueTypeCompositeGlyphFlag, _ImageFormat, _TokenType, PdfTextStyle, _PdfColorSpace, _PdfFlateStream, _PdfCatalog, _PdfCrossReference, PdfDocument, PdfAnnotationExportSettings, PdfFormFieldExportSettings, PdfPageSettings, PdfMargins, PdfFileStructure, PdfPage, PdfDestination, PdfBookmarkBase, PdfBookmark, PdfNamedDestination, _PdfNamedDestinationCollection, _PdfLexicalOperator, _PdfParser, _Linearization, _PdfName, _PdfCommand, _PdfReference, _PdfReferenceSet, _PdfReferenceSetCache, Dictionary, _PdfDictionary, _PdfNull, _clearPrimitiveCaches, _isName, _isCommand, PdfPredictorStream, _toUnsigned, _toSigned16, _toSigned32, _copyRange, _checkType, _getDecoder, _checkRotation, _getPageIndex, _annotationFlagsToString, _stringToAnnotationFlags, _stringToPdfString, _stringToBytes, _areArrayEqual, _numberToString, _areNotEqual, _bytesToString, _decodeUTF8, _stringToUnicodeArray, _byteArrayToHexString, _hexStringToByteArray, _hexStringToString, _isWhiteSpace, _decode, _encode, _getInheritableProperty, _parseRectangle, _calculateBounds, _toRectangle, _fromRectangle, _getUpdatedBounds, _convertToColor, _parseColor, _mapBorderStyle, _mapBorderEffectStyle, _reverseMapEndingStyle, _mapLineEndingStyle, _mapHighlightMode, _reverseMapHighlightMode, _reverseMapBlendMode, _mapBlendMode, _floatToString, _addProcSet, _getNewGuidString, _escapePdfName, _getBezierArc, _findPage, _checkField, _getItemValue, _getStateTemplate, _getColorValue, _setMatrix, _styleToString, _stringToStyle, _mapMeasurementUnit, _mapMarkupAnnotationType, _reverseMarkupAnnotationType, _mapGraphicsUnit, _mapRubberStampIcon, _mapPopupIcon, _reverseMapAnnotationState, _mapAnnotationState, _reverseMapAnnotationStateModel, _mapAnnotationStateModel, _mapAttachmentIcon, _mapAnnotationIntent, _reverseMapPdfFontStyle, _getSpecialCharacter, _getLatinCharacter, _encodeValue, _getCommentsOrReview, _checkReview, _checkComment, _updateVisibility, _removeDuplicateReference, _removeDuplicateFromResources, _removeReferences, BaseException, FormatError, ParserEndOfFileException, _defaultToString, _obtainFontDetails, _getFontStyle, _mapFont, _tryParseFontStream, _checkInkPoints, _obtainDestination, _updateBounds, _decodeText, _getSize, _stringToBigEndianBytes, PdfAnnotationCollection, PdfPopupAnnotationCollection, PdfAnnotation, PdfComment, PdfLineAnnotation, PdfCircleAnnotation, PdfEllipseAnnotation, PdfSquareAnnotation, PdfRectangleAnnotation, PdfPolygonAnnotation, PdfPolyLineAnnotation, PdfAngleMeasurementAnnotation, PdfInkAnnotation, PdfPopupAnnotation, PdfFileLinkAnnotation, PdfUriAnnotation, PdfDocumentLinkAnnotation, PdfTextWebLinkAnnotation, PdfAttachmentAnnotation, Pdf3DAnnotation, PdfTextMarkupAnnotation, PdfWatermarkAnnotation, PdfRubberStampAnnotation, PdfSoundAnnotation, PdfFreeTextAnnotation, PdfRedactionAnnotation, PdfRichMediaAnnotation, PdfWidgetAnnotation, PdfStateItem, PdfRadioButtonListItem, PdfListFieldItem, PdfAnnotationCaption, PdfAnnotationLineEndingStyle, PdfInteractiveBorder, PdfAnnotationBorder, PdfBorderEffect, _PaintParameter, PdfAppearance, _PdfPaddings, _DecompressedOutput, _DeflateStream, _Inflater, _HuffmanTree, _InBuffer, _InflaterState, _BlockType, _PdfFontMetrics, _WidthTable, _StandardWidthTable, _CjkWidthTable, _CjkWidth, _CjkSameWidth, _CjkDifferentWidth, PdfFont, PdfStandardFont, PdfCjkStandardFont, PdfTrueTypeFont, _PdfStandardFontMetricsFactory, _PdfCjkStandardFontMetricsFactory, _PdfCjkFontDescriptorFactory, PdfFontStyle, PdfFontFamily, PdfCjkFontFamily, _UnicodeLine, PdfStringFormat, PdfVerticalAlignment, _PdfStringLayouter, _PdfStringLayoutResult, _LineInfo, _LineType, _StringTokenizer, _TrueTypeReader, _TrueTypeNameRecord, _TrueTypeMetrics, _TrueTypeLongHorMetric, _TrueTypeGlyph, _TrueTypeLocaTable, _TrueTypeGlyphHeader, _BigEndianWriter, _TrueTypeTableInfo, _TrueTypeOS2Table, _TrueTypePostTable, _TrueTypeNameTable, _TrueTypeMicrosoftCmapSubTable, _TrueTypeHorizontalHeaderTable, _TrueTypeHeadTable, _TrueTypeCmapTable, _TrueTypeCmapSubTable, _TrueTypeAppleCmapSubTable, _TrueTypeTrimmedCmapSubTable, _UnicodeTrueTypeFont, PdfField, PdfTextBoxField, PdfButtonField, PdfCheckBoxField, PdfRadioButtonListField, PdfListField, PdfComboBoxField, PdfListBoxField, PdfSignatureField, _PdfDefaultAppearance, PdfForm, PdfGraphics, _PdfTransformationMatrix, _Matrix, PdfGraphicsState, _TextRenderingMode, PdfBrush, PdfPen, _PdfUnitConvertor, _PdfPath, _PathPointType, _PdfStreamWriter, PdfTemplate, _Bidirectional, _RtlCharacters, _ArabicShapeRenderer, _ArabicShape, _RtlRenderer, _ImageDecoder, PdfBitmap, PdfImage, _PngDecoder, _JpegDecoder, _PdfEncryptor, _MD5, _Sha256, _Sha512, _Word64, _EncryptionKey, _BasicEncryption, _AdvancedEncryption, _Cipher, _NormalCipherFour, _AdvancedEncryptionBaseCipher, _AdvancedEncryption128Cipher, _AdvancedEncryption256Cipher, _NullCipher, _CipherTransform, _ExportHelper, _XfdfDocument, _FontStructure, _XmlWriter, _Namespace, _XmlElement, _XmlAttribute, _FdfDocument, _FdfHelper, _JsonDocument, _XmlDocument };
|
|
52896
53024
|
//# sourceMappingURL=ej2-pdf.es2015.js.map
|