@syncfusion/ej2-pdf 24.2.3 → 24.2.7

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 : 24.2.3
3
+ * version : 24.2.7
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@24.1.47",
3
+ "_id": "@syncfusion/ej2-pdf@24.2.5",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-QTgs7ywpkjEhzHxKJbKiVNVzwG98Yghd17lY1jdvFwMY3F2pqGjSlT+eyZvD3YXRaKxw1qJEbpaAuzHC7QHX1Q==",
5
+ "_integrity": "sha512-2i1KxEMaZLvQ/J3GgXzQUyJSSfDSm/av4zXUpDztp5fie0IB05ilwNo5nlnzzLyJi0/oWGeu9AcDIEYDAPUQbA==",
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-24.1.47.tgz",
25
- "_shasum": "7c23a2f46e7f68cf7a8e566f60e2d07f779984a5",
24
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf/-/ej2-pdf-24.2.5.tgz",
25
+ "_shasum": "b4957dcc6ed53e4300cf0568c397df7d7e9e1d8d",
26
26
  "_spec": "@syncfusion/ej2-pdf@*",
27
27
  "_where": "/jenkins/workspace/elease-automation_release_24.1.1/packages/included",
28
28
  "author": {
@@ -30,7 +30,7 @@
30
30
  },
31
31
  "bundleDependencies": false,
32
32
  "dependencies": {
33
- "@syncfusion/ej2-base": "~24.2.3",
33
+ "@syncfusion/ej2-base": "~24.2.7",
34
34
  "@syncfusion/ej2-compression": "~24.2.3"
35
35
  },
36
36
  "deprecated": false,
@@ -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": "24.2.3",
58
+ "version": "24.2.7",
59
59
  "sideEffects": false,
60
60
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
61
61
  }
@@ -8115,50 +8115,54 @@ var PdfDocumentLinkAnnotation = /** @class */ (function (_super) {
8115
8115
  referenceArray = referenceValue;
8116
8116
  }
8117
8117
  }
8118
- if (referenceArray) {
8118
+ if (referenceArray && (referenceArray[0] instanceof _PdfReference || typeof referenceArray[0] === 'number')) {
8119
+ var document_1 = this._crossReference._document;
8120
+ var index = void 0;
8119
8121
  if (referenceArray[0] instanceof _PdfReference) {
8120
- var document_1 = this._crossReference._document;
8121
- var index = _getPageIndex(document_1, this._crossReference._fetch(referenceArray[0]));
8122
- var page = document_1.getPage(index);
8123
- if (page) {
8124
- var mode = referenceArray[1];
8125
- if (mode.name === 'FitBH' || mode.name === 'FitH') {
8126
- var top_5 = referenceArray[2];
8127
- var topValue = (typeof top_5 !== 'undefined' && top_5 !== null) ? (page.size[1] - top_5) : 0;
8128
- this._destination = new PdfDestination(page, [0, topValue]);
8129
- if (typeof top_5 === 'undefined' || top_5 === null) {
8130
- this._destination._setValidation(false);
8131
- }
8122
+ index = _getPageIndex(document_1, this._crossReference._fetch(referenceArray[0]));
8123
+ }
8124
+ else {
8125
+ index = referenceArray[0];
8126
+ }
8127
+ var page = document_1.getPage(index);
8128
+ if (page) {
8129
+ var mode = referenceArray[1];
8130
+ if (mode.name === 'FitBH' || mode.name === 'FitH') {
8131
+ var top_5 = referenceArray[2];
8132
+ var topValue = (typeof top_5 !== 'undefined' && top_5 !== null) ? (page.size[1] - top_5) : 0;
8133
+ this._destination = new PdfDestination(page, [0, topValue]);
8134
+ if (typeof top_5 === 'undefined' || top_5 === null) {
8135
+ this._destination._setValidation(false);
8132
8136
  }
8133
- else if (mode.name === 'XYZ') {
8134
- var left = referenceArray[2];
8135
- var top_6 = referenceArray[3];
8136
- var zoom = referenceArray[4];
8137
- var topValue = (typeof top_6 !== 'undefined' && top_6 !== null) ? (page.size[1] - top_6) : 0;
8138
- var leftValue = (typeof left !== 'undefined' && left !== null) ? left : 0;
8139
- this._destination = new PdfDestination(page, [leftValue, topValue]);
8140
- if (typeof zoom !== 'undefined' && zoom !== null) {
8141
- this._destination.zoom = zoom;
8142
- }
8143
- if ((typeof left !== 'undefined' && left !== null) || (typeof top_6 !== 'undefined' && top_6 !== null)
8144
- || (typeof zoom !== 'undefined' && zoom !== null)) {
8145
- this._destination._setValidation(false);
8146
- }
8137
+ }
8138
+ else if (mode.name === 'XYZ') {
8139
+ var left = referenceArray[2];
8140
+ var top_6 = referenceArray[3];
8141
+ var zoom = referenceArray[4];
8142
+ var topValue = (typeof top_6 !== 'undefined' && top_6 !== null) ? (page.size[1] - top_6) : 0;
8143
+ var leftValue = (typeof left !== 'undefined' && left !== null) ? left : 0;
8144
+ this._destination = new PdfDestination(page, [leftValue, topValue]);
8145
+ if (typeof zoom !== 'undefined' && zoom !== null) {
8146
+ this._destination.zoom = zoom;
8147
8147
  }
8148
- else if (mode.name === 'FitR') {
8149
- if (referenceArray.length === 6) {
8150
- var left = referenceArray[2];
8151
- var bottom = referenceArray[3];
8152
- var right = referenceArray[4];
8153
- var top_7 = referenceArray[5];
8154
- this._destination = new PdfDestination(page, [left, bottom, right, top_7]);
8155
- }
8148
+ if ((typeof left !== 'undefined' && left !== null) || (typeof top_6 !== 'undefined' && top_6 !== null)
8149
+ || (typeof zoom !== 'undefined' && zoom !== null)) {
8150
+ this._destination._setValidation(false);
8156
8151
  }
8157
- else if (mode.name === 'Fit') {
8158
- this._destination = new PdfDestination(page);
8159
- this._destination.mode = PdfDestinationMode.fitToPage;
8152
+ }
8153
+ else if (mode.name === 'FitR') {
8154
+ if (referenceArray.length === 6) {
8155
+ var left = referenceArray[2];
8156
+ var bottom = referenceArray[3];
8157
+ var right = referenceArray[4];
8158
+ var top_7 = referenceArray[5];
8159
+ this._destination = new PdfDestination(page, [left, bottom, right, top_7]);
8160
8160
  }
8161
8161
  }
8162
+ else if (mode.name === 'Fit') {
8163
+ this._destination = new PdfDestination(page);
8164
+ this._destination.mode = PdfDestinationMode.fitToPage;
8165
+ }
8162
8166
  }
8163
8167
  }
8164
8168
  }
@@ -376,22 +376,26 @@ var PdfForm = /** @class */ (function () {
376
376
  if (page && document_1) {
377
377
  for (var i = 0; i < this._fieldCollection.length; i++) {
378
378
  var field = this._fieldCollection[Number.parseInt(i.toString(), 10)];
379
- var index = _getPageIndex(document_1, field.page._pageDictionary);
380
- if (fieldCollection.has(index)) {
381
- value = fieldCollection.get(index);
382
- value.push(field);
383
- }
384
- else {
385
- value = [];
386
- value.push(field);
387
- fieldCollection.set(index, value);
388
- }
389
- var page_1 = document_1.getPage(index);
390
- if (!this._tabCollection.has(index)) {
391
- this._tabCollection.set(index, page_1.tabOrder);
392
- }
393
- if (setTabOrder) {
394
- page_1.tabOrder = this._tabCollection.get(index);
379
+ if (field.page) {
380
+ var index = _getPageIndex(document_1, field.page._pageDictionary);
381
+ if (index >= 0) {
382
+ if (fieldCollection.has(index)) {
383
+ value = fieldCollection.get(index);
384
+ value.push(field);
385
+ }
386
+ else {
387
+ value = [];
388
+ value.push(field);
389
+ fieldCollection.set(index, value);
390
+ }
391
+ var page_1 = document_1.getPage(index);
392
+ if (!this._tabCollection.has(index)) {
393
+ this._tabCollection.set(index, page_1.tabOrder);
394
+ }
395
+ if (setTabOrder) {
396
+ page_1.tabOrder = this._tabCollection.get(index);
397
+ }
398
+ }
395
399
  }
396
400
  }
397
401
  var fieldsCount_1 = 0;
@@ -481,6 +481,14 @@ var _JsonDocument = /** @class */ (function (_super) {
481
481
  case 'ca':
482
482
  this._writeAttributeString(key.toLowerCase(), primitive);
483
483
  break;
484
+ case 'CustomData':
485
+ if (primitive && primitive.length > 2 && primitive.startsWith('{') && primitive.endsWith('}')) {
486
+ this._table.set(key, primitive);
487
+ }
488
+ else {
489
+ this._writeAttributeString(key, primitive);
490
+ }
491
+ break;
484
492
  default:
485
493
  this._writeAttributeString(key, primitive);
486
494
  break;
@@ -1134,7 +1142,7 @@ var _JsonDocument = /** @class */ (function (_super) {
1134
1142
  }
1135
1143
  break;
1136
1144
  case 'customdata':
1137
- _this._addString(dictionary, 'CustomData', value);
1145
+ _this._addString(dictionary, 'CustomData', typeof value === 'string' ? value : JSON.stringify(value));
1138
1146
  break;
1139
1147
  case 'appearance':
1140
1148
  _this._addAppearanceData(dictionary, value);