@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.
@@ -1,6 +1,6 @@
1
1
  /*!
2
2
  * filename: index.d.ts
3
- * version : 23.1.44
3
+ * version : 23.2.4
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.1.39",
3
+ "_id": "@syncfusion/ej2-pdf@23.1.44",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-tLY2W2Z0Idbb5+dT440TVLK1i0RojV+BeOXnrJpWFrAvEKCfoK+2+EszHgYTh8mnWzcxESqfx72VCaX7Qkr4nA==",
5
+ "_integrity": "sha512-8HbSb/V/LGnq4auV59phtsHcMVBv7UR0AIUl/s/knmrkr07ZR9Oy3W8K+g8brO3IUnL1T5hrtcBQffH8nZi4uA==",
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.1.39.tgz",
25
- "_shasum": "129bc305e8eb6be65112ce8aa75144fa102445e8",
24
+ "_resolved": "https://nexus.syncfusion.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf/-/ej2-pdf-23.1.44.tgz",
25
+ "_shasum": "bffcba5e74423d38f84f2900ca6ad4d3aea41b28",
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.1.41",
34
- "@syncfusion/ej2-compression": "~23.1.36"
33
+ "@syncfusion/ej2-base": "~23.2.4",
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.1.44",
58
+ "version": "23.2.4",
59
59
  "sideEffects": false,
60
60
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
61
61
  }
@@ -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(referenceValue)) {
8116
- referenceArray = referenceValue;
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
- else {
49
- form = new _PdfDictionary(this._crossReference);
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: Object;
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[cacheKey]; // eslint-disable-line
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[cacheKey] = imageStream; // eslint-disable-line
780
+ this.imageCache.set(cacheKey, imageStream);
781
781
  }
782
782
  this.second = _PdfCommand.get('EI');
783
783
  this.shift();