@syncfusion/ej2-pdf 23.1.44 → 23.2.4
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 +8 -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 +22 -13
- package/dist/es6/ej2-pdf.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf.es5.js +22 -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.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
|
@@ -21353,12 +21353,17 @@ class PdfDocumentLinkAnnotation extends PdfAnnotation {
|
|
|
21353
21353
|
else if (this._dictionary.has('A') && !this._destination) {
|
|
21354
21354
|
const action = this._dictionary.get('A');
|
|
21355
21355
|
if (action.has('D')) {
|
|
21356
|
-
const reference = action.get('D');
|
|
21357
|
-
if (reference) {
|
|
21358
|
-
const referenceValue = this._crossReference._fetch(reference); // eslint-disable-line
|
|
21356
|
+
const reference = action.get('D'); // eslint-disable-line
|
|
21357
|
+
if (reference !== null && typeof reference !== 'undefined') {
|
|
21359
21358
|
let referenceArray; // eslint-disable-line
|
|
21360
|
-
if (Array.isArray(
|
|
21361
|
-
referenceArray =
|
|
21359
|
+
if (Array.isArray(reference)) {
|
|
21360
|
+
referenceArray = reference;
|
|
21361
|
+
}
|
|
21362
|
+
else if (reference instanceof _PdfReference) {
|
|
21363
|
+
const referenceValue = this._crossReference._fetch(reference); // eslint-disable-line
|
|
21364
|
+
if (Array.isArray(referenceValue)) {
|
|
21365
|
+
referenceArray = referenceValue;
|
|
21366
|
+
}
|
|
21362
21367
|
}
|
|
21363
21368
|
if (referenceArray) {
|
|
21364
21369
|
if (referenceArray[0] instanceof _PdfReference) {
|
|
@@ -36049,16 +36054,20 @@ class _PdfCatalog {
|
|
|
36049
36054
|
if (this._catalogDictionary.has('AcroForm')) {
|
|
36050
36055
|
form = this._catalogDictionary.get('AcroForm');
|
|
36051
36056
|
}
|
|
36052
|
-
|
|
36053
|
-
form =
|
|
36054
|
-
const ref = this._crossReference._getNextReference();
|
|
36055
|
-
this._crossReference._cacheMap.set(ref, form);
|
|
36056
|
-
this._catalogDictionary.set('AcroForm', ref);
|
|
36057
|
-
this._catalogDictionary._updated = true;
|
|
36057
|
+
if (form === null || typeof form === 'undefined') {
|
|
36058
|
+
form = this._createForm();
|
|
36058
36059
|
}
|
|
36059
36060
|
return form;
|
|
36060
36061
|
}
|
|
36061
36062
|
/* eslint-disable */
|
|
36063
|
+
_createForm() {
|
|
36064
|
+
const form = new _PdfDictionary(this._crossReference);
|
|
36065
|
+
const ref = this._crossReference._getNextReference();
|
|
36066
|
+
this._crossReference._cacheMap.set(ref, form);
|
|
36067
|
+
this._catalogDictionary.set('AcroForm', ref);
|
|
36068
|
+
this._catalogDictionary._updated = true;
|
|
36069
|
+
return form;
|
|
36070
|
+
}
|
|
36062
36071
|
getPageDictionary(pageIndex) {
|
|
36063
36072
|
const nodesToVisit = [this._topPagesDictionary];
|
|
36064
36073
|
const visitedNodes = new _PdfReferenceSet();
|
|
@@ -37116,7 +37125,7 @@ class _PdfParser {
|
|
|
37116
37125
|
const dictBytes = stream.getBytes(dictLength);
|
|
37117
37126
|
stream.position = initialStreamPos;
|
|
37118
37127
|
cacheKey = this._computeMaxNumber(imageBytes) + '_' + this._computeMaxNumber(dictBytes);
|
|
37119
|
-
const cacheEntry = this.imageCache
|
|
37128
|
+
const cacheEntry = this.imageCache.get(cacheKey);
|
|
37120
37129
|
if (cacheEntry !== undefined) {
|
|
37121
37130
|
this.second = _PdfCommand.get('EI');
|
|
37122
37131
|
this.shift();
|
|
@@ -37130,7 +37139,7 @@ class _PdfParser {
|
|
|
37130
37139
|
imageStream = this.filter(imageStream, dictionary, length);
|
|
37131
37140
|
imageStream.dictionary = dictionary;
|
|
37132
37141
|
if (cacheKey !== undefined) {
|
|
37133
|
-
this.imageCache
|
|
37142
|
+
this.imageCache.set(cacheKey, imageStream);
|
|
37134
37143
|
}
|
|
37135
37144
|
this.second = _PdfCommand.get('EI');
|
|
37136
37145
|
this.shift();
|