@syncfusion/ej2-pdf 25.1.35 → 25.1.37
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 +51 -35
- package/dist/es6/ej2-pdf.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf.es5.js +51 -35
- 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 +5 -5
- package/src/pdf/core/pdf-document.js +51 -35
package/dist/global/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/*!
|
|
2
2
|
* filename: index.d.ts
|
|
3
|
-
* version : 25.1.
|
|
3
|
+
* version : 25.1.37
|
|
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@
|
|
3
|
+
"_id": "@syncfusion/ej2-pdf@25.1.35",
|
|
4
4
|
"_inBundle": false,
|
|
5
|
-
"_integrity": "sha512-
|
|
5
|
+
"_integrity": "sha512-Xc7M7OB3Ky2RaFsvufVzgwyt8wV+lDbN2w/gUJ2U/qgvtDEbO25mGId3FdTfuB+W7jACrSg/v7Q32XzcKwKvsA==",
|
|
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-
|
|
25
|
-
"_shasum": "
|
|
24
|
+
"_resolved": "https://nexus.syncfusioninternal.com/repository/ej2-hotfix-new/@syncfusion/ej2-pdf/-/ej2-pdf-25.1.35.tgz",
|
|
25
|
+
"_shasum": "4200e860c764ae3e2ecfff9460bf964404f6d9cc",
|
|
26
26
|
"_spec": "@syncfusion/ej2-pdf@*",
|
|
27
27
|
"_where": "/jenkins/workspace/elease-automation_release_25.1.1/packages/included",
|
|
28
28
|
"author": {
|
|
@@ -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": "25.1.
|
|
58
|
+
"version": "25.1.37",
|
|
59
59
|
"sideEffects": false,
|
|
60
60
|
"homepage": "https://www.syncfusion.com/javascript-ui-controls"
|
|
61
61
|
}
|
|
@@ -426,31 +426,45 @@ var PdfDocument = /** @class */ (function () {
|
|
|
426
426
|
pageDictionary.objId = pageReference.toString();
|
|
427
427
|
pageDictionary.update('Parent', sectionReference);
|
|
428
428
|
sectionDictionary.update('Kids', [pageReference]);
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
429
|
+
if (this.pageCount === 0) {
|
|
430
|
+
var parentReference = this._catalog._catalogDictionary._get('Pages');
|
|
431
|
+
if (parentReference && this._catalog._topPagesDictionary) {
|
|
432
|
+
this._catalog._topPagesDictionary.update('Kids', [sectionReference]);
|
|
433
|
+
sectionDictionary.update('Parent', parentReference);
|
|
434
|
+
}
|
|
435
|
+
else {
|
|
436
|
+
this._catalog._catalogDictionary.update('Pages', sectionReference);
|
|
437
|
+
}
|
|
438
|
+
this._pages = new Map();
|
|
439
|
+
this._pageCount = 1;
|
|
440
|
+
}
|
|
441
|
+
else {
|
|
442
|
+
var lastPage_1 = this.getPage(pageIndex === this.pageCount ? (pageIndex - 1) : pageIndex);
|
|
443
|
+
if (lastPage_1 && lastPage_1._pageDictionary) {
|
|
444
|
+
var parentReference = lastPage_1._pageDictionary._get('Parent');
|
|
445
|
+
var parentDictionary = this._crossReference._fetch(parentReference);
|
|
446
|
+
if (parentDictionary && parentDictionary.has('Kids')) {
|
|
447
|
+
var kids = parentDictionary.get('Kids');
|
|
448
|
+
if (kids) {
|
|
449
|
+
if (pageIndex === this.pageCount) {
|
|
450
|
+
kids.push(sectionReference);
|
|
451
|
+
}
|
|
452
|
+
else {
|
|
453
|
+
var newKids_1 = [];
|
|
454
|
+
kids.forEach(function (entry) {
|
|
455
|
+
if (entry === lastPage_1._ref) {
|
|
456
|
+
newKids_1.push(sectionReference);
|
|
457
|
+
}
|
|
458
|
+
newKids_1.push(entry);
|
|
459
|
+
});
|
|
460
|
+
kids = newKids_1;
|
|
461
|
+
this._updatePageCache(pageIndex);
|
|
462
|
+
}
|
|
463
|
+
parentDictionary.update('Kids', kids);
|
|
464
|
+
sectionDictionary.update('Parent', parentReference);
|
|
465
|
+
this._updatePageCount(parentDictionary, 1);
|
|
466
|
+
this._pageCount = this.pageCount + 1;
|
|
449
467
|
}
|
|
450
|
-
parentDictionary.update('Kids', kids);
|
|
451
|
-
sectionDictionary.update('Parent', parentReference);
|
|
452
|
-
this._updatePageCount(parentDictionary, 1);
|
|
453
|
-
this._pageCount = this.pageCount + 1;
|
|
454
468
|
}
|
|
455
469
|
}
|
|
456
470
|
}
|
|
@@ -550,17 +564,19 @@ var PdfDocument = /** @class */ (function () {
|
|
|
550
564
|
}
|
|
551
565
|
};
|
|
552
566
|
PdfDocument.prototype._removeParent = function (referenceToRemove, dictionary) {
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
567
|
+
if (dictionary.has('Parent')) {
|
|
568
|
+
var parentReference = dictionary._get('Parent');
|
|
569
|
+
var parentDictionary = this._crossReference._fetch(parentReference);
|
|
570
|
+
if (parentDictionary && parentDictionary.has('Kids')) {
|
|
571
|
+
var kids = parentDictionary.get('Kids');
|
|
572
|
+
if (kids.length === 1 && parentDictionary && parentDictionary.get('Type').name === 'Pages') {
|
|
573
|
+
this._removeParent(parentReference, parentDictionary);
|
|
574
|
+
}
|
|
575
|
+
else {
|
|
576
|
+
kids = kids.filter(function (item) { return item !== referenceToRemove; });
|
|
577
|
+
parentDictionary.update('Kids', kids);
|
|
578
|
+
this._updatePageCount(parentDictionary, -1);
|
|
579
|
+
}
|
|
564
580
|
}
|
|
565
581
|
}
|
|
566
582
|
};
|