@syncfusion/ej2-pdf 24.2.5 → 24.2.8

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.5
3
+ * version : 24.2.8
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.2.3",
3
+ "_id": "@syncfusion/ej2-pdf@24.2.7",
4
4
  "_inBundle": false,
5
- "_integrity": "sha512-vQG0fDg5tvHuRtT/9uTMa3Orr6hK7VAq1lcYCxbkCPVBWmi1c9drr18BPcByXRDZZLn2rRx/850Oehg3YokBAg==",
5
+ "_integrity": "sha512-zKAbVJ6XijhD/M1TfsTput/9SCdZgD5zj79PozijBc6h66Gk06sWq4cDl1O+Pp9V9pVe/PxYhqphK5XBvtfe/A==",
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.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf/-/ej2-pdf-24.2.3.tgz",
25
- "_shasum": "5ccb8b9c1e40253e3cf7377bfbc82c7803b5bb53",
24
+ "_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf/-/ej2-pdf-24.2.7.tgz",
25
+ "_shasum": "96197a90af3ba0c040e677f74649c3d5c9253c24",
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.5",
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.5",
58
+ "version": "24.2.8",
59
59
  "sideEffects": false,
60
60
  "homepage": "https://www.syncfusion.com/javascript-ui-controls"
61
61
  }
@@ -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);
@@ -54,18 +54,24 @@ var _PdfCrossReference = /** @class */ (function () {
54
54
  }
55
55
  }
56
56
  var hasRoot = false;
57
+ var root;
57
58
  try {
58
- var root = trailerDictionary.get('Root');
59
- if (root) {
59
+ root = trailerDictionary.get('Root');
60
+ }
61
+ catch (e) {
62
+ throw new BaseException('Invalid cross reference', 'XRefParseException');
63
+ }
64
+ if (root) {
65
+ try {
60
66
  var pagesEntry = root.get('Pages');
61
67
  if (pagesEntry) {
62
68
  this._root = root;
63
69
  hasRoot = true;
64
70
  }
65
71
  }
66
- }
67
- catch (ex) {
68
- throw new BaseException('Invalid cross reference', 'InvalidXRef');
72
+ catch (ex) {
73
+ throw new BaseException('Invalid cross reference', 'InvalidXRef');
74
+ }
69
75
  }
70
76
  if (!hasRoot) {
71
77
  if (!recoveryMode) {