@syncfusion/ej2-pdf 23.1.44 → 23.2.6
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 +35 -13
- package/dist/es6/ej2-pdf.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf.es5.js +35 -13
- 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 +7 -7
- 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/annotations/annotation.js +10 -5
- package/src/pdf/core/pdf-catalog.d.ts +1 -0
- package/src/pdf/core/pdf-catalog.js +10 -6
- package/src/pdf/core/pdf-cross-reference.d.ts +1 -1
- package/src/pdf/core/pdf-parser.js +2 -2
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 23.
|
|
3
|
+
* version : 23.2.6
|
|
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@23.
|
|
3
|
+
"_id": "@syncfusion/ej2-pdf@23.2.4",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-s074EOizxXQmqWsbCofpCxc1vyp/hn+HwkpauJupl7bfbZTqGye8Z7XhTES1ro6XgW//naBrAnXtCJJ6LQF+iA==",
|
|
6
6
|
"_location": "/@syncfusion/ej2-pdf",
|
|
7
7
|
"_phantomChildren": {},
|
|
8
8
|
"_requested": {
|
|
@@ -21,8 +21,8 @@
|
|
|
21
21
|
"/@syncfusion/ej2",
|
|
22
22
|
"/@syncfusion/ej2-pdfviewer"
|
|
23
23
|
],
|
|
24
|
-
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf/-/ej2-pdf-23.
|
|
25
|
-
"_shasum": "
|
|
24
|
+
"_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf/-/ej2-pdf-23.2.4.tgz",
|
|
25
|
+
"_shasum": "aee4ed26dea7fdff2cd434724b143c5f8bd968f3",
|
|
26
26
|
"_spec": "@syncfusion/ej2-pdf@*",
|
|
27
27
|
"_where": "/jenkins/workspace/elease-automation_release_23.1.1/packages/included",
|
|
28
28
|
"author": {
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
},
|
|
31
31
|
"bundleDependencies": false,
|
|
32
32
|
"dependencies": {
|
|
33
|
-
"@syncfusion/ej2-base": "~23.
|
|
34
|
-
"@syncfusion/ej2-compression": "~23.
|
|
33
|
+
"@syncfusion/ej2-base": "~23.2.6",
|
|
34
|
+
"@syncfusion/ej2-compression": "~23.2.4"
|
|
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": "23.
|
|
58
|
+
"version": "23.2.6",
|
|
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);
|
|
@@ -8108,12 +8108,17 @@ var PdfDocumentLinkAnnotation = /** @class */ (function (_super) {
|
|
|
8108
8108
|
else if (this._dictionary.has('A') && !this._destination) {
|
|
8109
8109
|
var action = this._dictionary.get('A');
|
|
8110
8110
|
if (action.has('D')) {
|
|
8111
|
-
var reference = action.get('D');
|
|
8112
|
-
if (reference) {
|
|
8113
|
-
var referenceValue = this._crossReference._fetch(reference); // eslint-disable-line
|
|
8111
|
+
var reference = action.get('D'); // eslint-disable-line
|
|
8112
|
+
if (reference !== null && typeof reference !== 'undefined') {
|
|
8114
8113
|
var referenceArray = void 0; // eslint-disable-line
|
|
8115
|
-
if (Array.isArray(
|
|
8116
|
-
referenceArray =
|
|
8114
|
+
if (Array.isArray(reference)) {
|
|
8115
|
+
referenceArray = reference;
|
|
8116
|
+
}
|
|
8117
|
+
else if (reference instanceof _PdfReference) {
|
|
8118
|
+
var referenceValue = this._crossReference._fetch(reference); // eslint-disable-line
|
|
8119
|
+
if (Array.isArray(referenceValue)) {
|
|
8120
|
+
referenceArray = referenceValue;
|
|
8121
|
+
}
|
|
8117
8122
|
}
|
|
8118
8123
|
if (referenceArray) {
|
|
8119
8124
|
if (referenceArray[0] instanceof _PdfReference) {
|
|
@@ -10,6 +10,7 @@ export declare class _PdfCatalog {
|
|
|
10
10
|
readonly version: string;
|
|
11
11
|
readonly pageCount: number;
|
|
12
12
|
readonly acroForm: _PdfDictionary;
|
|
13
|
+
_createForm(): _PdfDictionary;
|
|
13
14
|
getPageDictionary(pageIndex: number): {
|
|
14
15
|
dictionary: _PdfDictionary;
|
|
15
16
|
reference: _PdfReference;
|
|
@@ -45,12 +45,8 @@ var _PdfCatalog = /** @class */ (function () {
|
|
|
45
45
|
if (this._catalogDictionary.has('AcroForm')) {
|
|
46
46
|
form = this._catalogDictionary.get('AcroForm');
|
|
47
47
|
}
|
|
48
|
-
|
|
49
|
-
form =
|
|
50
|
-
var ref = this._crossReference._getNextReference();
|
|
51
|
-
this._crossReference._cacheMap.set(ref, form);
|
|
52
|
-
this._catalogDictionary.set('AcroForm', ref);
|
|
53
|
-
this._catalogDictionary._updated = true;
|
|
48
|
+
if (form === null || typeof form === 'undefined') {
|
|
49
|
+
form = this._createForm();
|
|
54
50
|
}
|
|
55
51
|
return form;
|
|
56
52
|
},
|
|
@@ -58,6 +54,14 @@ var _PdfCatalog = /** @class */ (function () {
|
|
|
58
54
|
configurable: true
|
|
59
55
|
});
|
|
60
56
|
/* eslint-disable */
|
|
57
|
+
_PdfCatalog.prototype._createForm = function () {
|
|
58
|
+
var form = new _PdfDictionary(this._crossReference);
|
|
59
|
+
var ref = this._crossReference._getNextReference();
|
|
60
|
+
this._crossReference._cacheMap.set(ref, form);
|
|
61
|
+
this._catalogDictionary.set('AcroForm', ref);
|
|
62
|
+
this._catalogDictionary._updated = true;
|
|
63
|
+
return form;
|
|
64
|
+
};
|
|
61
65
|
_PdfCatalog.prototype.getPageDictionary = function (pageIndex) {
|
|
62
66
|
var nodesToVisit = [this._topPagesDictionary];
|
|
63
67
|
var visitedNodes = new _PdfReferenceSet();
|
|
@@ -8,7 +8,7 @@ export declare class _PdfCrossReference {
|
|
|
8
8
|
_stream: _PdfStream;
|
|
9
9
|
_pendingRefs: _PdfReferenceSet;
|
|
10
10
|
_entries: _PdfObjectInformation[];
|
|
11
|
-
_crossReferencePosition:
|
|
11
|
+
_crossReferencePosition: any;
|
|
12
12
|
_cacheMap: Map<_PdfReference, any>;
|
|
13
13
|
_startXRefQueue: number[];
|
|
14
14
|
_trailer: _PdfDictionary;
|
|
@@ -763,7 +763,7 @@ var _PdfParser = /** @class */ (function () {
|
|
|
763
763
|
var dictBytes = stream.getBytes(dictLength);
|
|
764
764
|
stream.position = initialStreamPos;
|
|
765
765
|
cacheKey = this._computeMaxNumber(imageBytes) + '_' + this._computeMaxNumber(dictBytes);
|
|
766
|
-
var cacheEntry = this.imageCache
|
|
766
|
+
var cacheEntry = this.imageCache.get(cacheKey);
|
|
767
767
|
if (cacheEntry !== undefined) {
|
|
768
768
|
this.second = _PdfCommand.get('EI');
|
|
769
769
|
this.shift();
|
|
@@ -777,7 +777,7 @@ var _PdfParser = /** @class */ (function () {
|
|
|
777
777
|
imageStream = this.filter(imageStream, dictionary, length);
|
|
778
778
|
imageStream.dictionary = dictionary;
|
|
779
779
|
if (cacheKey !== undefined) {
|
|
780
|
-
this.imageCache
|
|
780
|
+
this.imageCache.set(cacheKey, imageStream);
|
|
781
781
|
}
|
|
782
782
|
this.second = _PdfCommand.get('EI');
|
|
783
783
|
this.shift();
|