@syncfusion/ej2-pdf 23.2.4 → 24.1.41
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 +0 -35
- 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 +40 -29
- package/dist/es6/ej2-pdf.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf.es5.js +38 -27
- 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 +8 -8
- package/src/pdf/core/annotations/annotation-collection.d.ts +1 -0
- package/src/pdf/core/annotations/annotation-collection.js +13 -0
- package/src/pdf/core/import-export/json-document.js +16 -16
- package/src/pdf/core/import-export/xfdf-document.js +9 -11
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version :
|
|
3
|
+
* version : 24.1.41
|
|
4
4
|
* Copyright Syncfusion Inc. 2001 - 2023. All rights reserved.
|
|
5
5
|
* Use of this code is subject to the terms of our license.
|
|
6
6
|
* A copy of the current license can be obtained at any time by e-mailing
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"_from": "@syncfusion/ej2-pdf@*",
|
|
3
|
-
"_id": "@syncfusion/ej2-pdf@
|
|
3
|
+
"_id": "@syncfusion/ej2-pdf@17.6.0",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-umf2zK3uDiJd0vrloKfKe+U/coP8imiIPZQgQqK1CRFzK/johV9adrFP14+EyNsqzHz5gf+/+p2IbSpcVp2B4A==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-pdf",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -21,17 +21,17 @@
|
|
|
21
21
|
"/@syncfusion/ej2",
|
|
22
22
|
"/@syncfusion/ej2-pdfviewer"
|
|
23
23
|
],
|
|
24
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-
|
|
25
|
-
"_shasum": "
|
|
24
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-release/@syncfusion/ej2-pdf/-/ej2-pdf-17.6.0.tgz",
|
|
25
|
+
"_shasum": "b36f79b8fb510562013a7baa83f0ff19ad7108ba",
|
|
26
26
|
"_spec": "@syncfusion/ej2-pdf@*",
|
|
27
|
-
"_where": "/jenkins/workspace/elease-
|
|
27
|
+
"_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
|
|
28
28
|
"author": {
|
|
29
29
|
"name": "Syncfusion Inc."
|
|
30
30
|
},
|
|
31
31
|
"bundleDependencies": false,
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@syncfusion/ej2-base": "~
|
|
34
|
-
"@syncfusion/ej2-compression": "~
|
|
33
|
+
"@syncfusion/ej2-base": "~24.1.41",
|
|
34
|
+
"@syncfusion/ej2-compression": "~24.1.41"
|
|
35
35
|
},
|
|
36
36
|
"deprecated": false,
|
|
37
37
|
"description": "Feature-rich JavaScript PDF library with built-in support for loading and manipulating PDF document.",
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"url": "https://github.com/syncfusion/ej2-javascript-ui-controls/tree/master/controls/pdf"
|
|
56
56
|
},
|
|
57
57
|
"typings": "index.d.ts",
|
|
58
|
-
"version": "
|
|
58
|
+
"version": "24.1.41",
|
|
59
59
|
"sideEffects": false,
|
|
60
60
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
61
61
|
}
|
|
@@ -130,6 +130,7 @@ export declare class PdfAnnotationCollection {
|
|
|
130
130
|
* ```
|
|
131
131
|
*/
|
|
132
132
|
removeAt(index: number): void;
|
|
133
|
+
_reorderParsedAnnotations(index: number): void;
|
|
133
134
|
_updateCustomAppearanceResource(annotation: PdfAnnotation): void;
|
|
134
135
|
_addCommentsAndReview(annotation: PdfComment, flag: number): void;
|
|
135
136
|
_updateChildReference(annotation: PdfComment, collection: PdfPopupAnnotationCollection, flag: number): void;
|
|
@@ -217,6 +217,7 @@ var PdfAnnotationCollection = /** @class */ (function () {
|
|
|
217
217
|
}
|
|
218
218
|
if (this._parsedAnnotations.has(index)) {
|
|
219
219
|
this._parsedAnnotations.delete(index);
|
|
220
|
+
this._reorderParsedAnnotations(index);
|
|
220
221
|
}
|
|
221
222
|
var crossReference = this._page._crossReference;
|
|
222
223
|
if (crossReference && crossReference._cacheMap.has(reference)) {
|
|
@@ -224,6 +225,18 @@ var PdfAnnotationCollection = /** @class */ (function () {
|
|
|
224
225
|
}
|
|
225
226
|
}
|
|
226
227
|
};
|
|
228
|
+
PdfAnnotationCollection.prototype._reorderParsedAnnotations = function (index) {
|
|
229
|
+
var result = new Map();
|
|
230
|
+
this._parsedAnnotations.forEach(function (value, key) {
|
|
231
|
+
if (key > index) {
|
|
232
|
+
result.set(key - 1, value);
|
|
233
|
+
}
|
|
234
|
+
else {
|
|
235
|
+
result.set(key, value);
|
|
236
|
+
}
|
|
237
|
+
});
|
|
238
|
+
this._parsedAnnotations = result;
|
|
239
|
+
};
|
|
227
240
|
PdfAnnotationCollection.prototype._updateCustomAppearanceResource = function (annotation) {
|
|
228
241
|
if (annotation instanceof PdfRubberStampAnnotation && typeof annotation._appearance !== 'undefined') {
|
|
229
242
|
annotation._appearance.normal.graphics._processResources(annotation._crossReference);
|
|
@@ -624,27 +624,27 @@ var _JsonDocument = /** @class */ (function (_super) {
|
|
|
624
624
|
var dataTable = new Map(); // eslint-disable-line
|
|
625
625
|
var streamTable = new Map(); // eslint-disable-line
|
|
626
626
|
var streamDictionary = value.dictionary;
|
|
627
|
+
var data = value.getString(true);
|
|
628
|
+
if (!streamDictionary.has('Length') && data && data !== '') {
|
|
629
|
+
streamDictionary.update('Length', value.length);
|
|
630
|
+
}
|
|
627
631
|
this._writeAppearanceDictionary(streamTable, streamDictionary);
|
|
628
|
-
var length_1 = streamDictionary.get('Length');
|
|
629
632
|
var type = void 0;
|
|
630
633
|
if (streamDictionary.has('Subtype')) {
|
|
631
634
|
type = this._getValue(streamDictionary.get('Subtype'));
|
|
632
635
|
}
|
|
633
|
-
if (
|
|
634
|
-
|
|
635
|
-
(
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
if (data && data !== '') {
|
|
646
|
-
dataTable.set('bytes', data);
|
|
647
|
-
}
|
|
636
|
+
if ((!streamDictionary.has('Type') && !streamDictionary.has('Subtype')) ||
|
|
637
|
+
(streamDictionary.has('Subtype') &&
|
|
638
|
+
(type === 'Image' || type === 'Form' || type === 'CIDFontType0C' || type === 'OpenType'))) {
|
|
639
|
+
dataTable.set('mode', 'raw');
|
|
640
|
+
dataTable.set('encoding', 'hex');
|
|
641
|
+
}
|
|
642
|
+
else {
|
|
643
|
+
dataTable.set('mode', 'filtered');
|
|
644
|
+
dataTable.set('encoding', 'ascii');
|
|
645
|
+
}
|
|
646
|
+
if (data && data !== '') {
|
|
647
|
+
dataTable.set('bytes', data);
|
|
648
648
|
}
|
|
649
649
|
streamTable.set('data', this._convertToJson(dataTable));
|
|
650
650
|
this._writeTable('stream', this._convertToJson(streamTable), table, key, array);
|
|
@@ -1348,26 +1348,24 @@ var _XfdfDocument = /** @class */ (function (_super) {
|
|
|
1348
1348
|
var streamDictionary = primitive.dictionary;
|
|
1349
1349
|
this._writePrefix(writer, 'STREAM', key);
|
|
1350
1350
|
writer._writeAttributeString('DEFINE', '');
|
|
1351
|
+
var data = primitive.getString();
|
|
1352
|
+
if (!streamDictionary.has('Length') && data && data !== '') {
|
|
1353
|
+
streamDictionary.update('Length', primitive.length);
|
|
1354
|
+
}
|
|
1351
1355
|
this._writeAppearanceDictionary(writer, streamDictionary);
|
|
1352
1356
|
writer._writeStartElement('DATA');
|
|
1353
|
-
|
|
1354
|
-
if (length_1 > 0 && (streamDictionary.has('Subtype') &&
|
|
1357
|
+
if ((streamDictionary.has('Subtype') &&
|
|
1355
1358
|
this._getValue(streamDictionary.get('Subtype')) === 'Image') ||
|
|
1356
1359
|
(!streamDictionary.has('Type') && !streamDictionary.has('Subtype'))) {
|
|
1357
1360
|
writer._writeAttributeString('MODE', 'RAW');
|
|
1358
1361
|
writer._writeAttributeString('ENCODING', 'HEX');
|
|
1359
|
-
var data = primitive.getString();
|
|
1360
|
-
if (data && data !== '') {
|
|
1361
|
-
writer._writeRaw(data);
|
|
1362
|
-
}
|
|
1363
1362
|
}
|
|
1364
|
-
else
|
|
1363
|
+
else {
|
|
1365
1364
|
writer._writeAttributeString('MODE', 'FILTERED');
|
|
1366
1365
|
writer._writeAttributeString('ENCODING', 'ASCII');
|
|
1367
|
-
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
}
|
|
1366
|
+
}
|
|
1367
|
+
if (data && data !== '') {
|
|
1368
|
+
writer._writeRaw(data);
|
|
1371
1369
|
}
|
|
1372
1370
|
writer._writeEndElement();
|
|
1373
1371
|
writer._writeEndElement();
|