@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
package/dist/es6/ej2-pdf.es5.js
CHANGED
|
@@ -22214,12 +22214,17 @@ var PdfDocumentLinkAnnotation = /** @__PURE__ @class */ (function (_super) {
|
|
|
22214
22214
|
else if (this._dictionary.has('A') && !this._destination) {
|
|
22215
22215
|
var action = this._dictionary.get('A');
|
|
22216
22216
|
if (action.has('D')) {
|
|
22217
|
-
var reference = action.get('D');
|
|
22218
|
-
if (reference) {
|
|
22219
|
-
var referenceValue = this._crossReference._fetch(reference); // eslint-disable-line
|
|
22217
|
+
var reference = action.get('D'); // eslint-disable-line
|
|
22218
|
+
if (reference !== null && typeof reference !== 'undefined') {
|
|
22220
22219
|
var referenceArray = void 0; // eslint-disable-line
|
|
22221
|
-
if (Array.isArray(
|
|
22222
|
-
referenceArray =
|
|
22220
|
+
if (Array.isArray(reference)) {
|
|
22221
|
+
referenceArray = reference;
|
|
22222
|
+
}
|
|
22223
|
+
else if (reference instanceof _PdfReference) {
|
|
22224
|
+
var referenceValue = this._crossReference._fetch(reference); // eslint-disable-line
|
|
22225
|
+
if (Array.isArray(referenceValue)) {
|
|
22226
|
+
referenceArray = referenceValue;
|
|
22227
|
+
}
|
|
22223
22228
|
}
|
|
22224
22229
|
if (referenceArray) {
|
|
22225
22230
|
if (referenceArray[0] instanceof _PdfReference) {
|
|
@@ -37484,12 +37489,8 @@ var _PdfCatalog = /** @__PURE__ @class */ (function () {
|
|
|
37484
37489
|
if (this._catalogDictionary.has('AcroForm')) {
|
|
37485
37490
|
form = this._catalogDictionary.get('AcroForm');
|
|
37486
37491
|
}
|
|
37487
|
-
|
|
37488
|
-
form =
|
|
37489
|
-
var ref = this._crossReference._getNextReference();
|
|
37490
|
-
this._crossReference._cacheMap.set(ref, form);
|
|
37491
|
-
this._catalogDictionary.set('AcroForm', ref);
|
|
37492
|
-
this._catalogDictionary._updated = true;
|
|
37492
|
+
if (form === null || typeof form === 'undefined') {
|
|
37493
|
+
form = this._createForm();
|
|
37493
37494
|
}
|
|
37494
37495
|
return form;
|
|
37495
37496
|
},
|
|
@@ -37497,6 +37498,14 @@ var _PdfCatalog = /** @__PURE__ @class */ (function () {
|
|
|
37497
37498
|
configurable: true
|
|
37498
37499
|
});
|
|
37499
37500
|
/* eslint-disable */
|
|
37501
|
+
_PdfCatalog.prototype._createForm = function () {
|
|
37502
|
+
var form = new _PdfDictionary(this._crossReference);
|
|
37503
|
+
var ref = this._crossReference._getNextReference();
|
|
37504
|
+
this._crossReference._cacheMap.set(ref, form);
|
|
37505
|
+
this._catalogDictionary.set('AcroForm', ref);
|
|
37506
|
+
this._catalogDictionary._updated = true;
|
|
37507
|
+
return form;
|
|
37508
|
+
};
|
|
37500
37509
|
_PdfCatalog.prototype.getPageDictionary = function (pageIndex) {
|
|
37501
37510
|
var nodesToVisit = [this._topPagesDictionary];
|
|
37502
37511
|
var visitedNodes = new _PdfReferenceSet();
|
|
@@ -38573,7 +38582,7 @@ var _PdfParser = /** @__PURE__ @class */ (function () {
|
|
|
38573
38582
|
var dictBytes = stream.getBytes(dictLength);
|
|
38574
38583
|
stream.position = initialStreamPos;
|
|
38575
38584
|
cacheKey = this._computeMaxNumber(imageBytes) + '_' + this._computeMaxNumber(dictBytes);
|
|
38576
|
-
var cacheEntry = this.imageCache
|
|
38585
|
+
var cacheEntry = this.imageCache.get(cacheKey);
|
|
38577
38586
|
if (cacheEntry !== undefined) {
|
|
38578
38587
|
this.second = _PdfCommand.get('EI');
|
|
38579
38588
|
this.shift();
|
|
@@ -38587,7 +38596,7 @@ var _PdfParser = /** @__PURE__ @class */ (function () {
|
|
|
38587
38596
|
imageStream = this.filter(imageStream, dictionary, length);
|
|
38588
38597
|
imageStream.dictionary = dictionary;
|
|
38589
38598
|
if (cacheKey !== undefined) {
|
|
38590
|
-
this.imageCache
|
|
38599
|
+
this.imageCache.set(cacheKey, imageStream);
|
|
38591
38600
|
}
|
|
38592
38601
|
this.second = _PdfCommand.get('EI');
|
|
38593
38602
|
this.shift();
|