@syncfusion/ej2-pdf 24.2.3 → 24.2.5
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 -1
- 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 +62 -54
- package/dist/es6/ej2-pdf.es2015.js.map +1 -1
- package/dist/es6/ej2-pdf.es5.js +62 -54
- 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 +6 -6
- package/src/pdf/core/annotations/annotation.js +42 -38
- package/src/pdf/core/form/form.js +20 -16
|
@@ -21655,50 +21655,54 @@ class PdfDocumentLinkAnnotation extends PdfAnnotation {
|
|
|
21655
21655
|
referenceArray = referenceValue;
|
|
21656
21656
|
}
|
|
21657
21657
|
}
|
|
21658
|
-
if (referenceArray) {
|
|
21658
|
+
if (referenceArray && (referenceArray[0] instanceof _PdfReference || typeof referenceArray[0] === 'number')) {
|
|
21659
|
+
const document = this._crossReference._document;
|
|
21660
|
+
let index;
|
|
21659
21661
|
if (referenceArray[0] instanceof _PdfReference) {
|
|
21660
|
-
|
|
21661
|
-
|
|
21662
|
-
|
|
21663
|
-
|
|
21664
|
-
|
|
21665
|
-
|
|
21666
|
-
|
|
21667
|
-
|
|
21668
|
-
|
|
21669
|
-
|
|
21670
|
-
|
|
21671
|
-
|
|
21662
|
+
index = _getPageIndex(document, this._crossReference._fetch(referenceArray[0]));
|
|
21663
|
+
}
|
|
21664
|
+
else {
|
|
21665
|
+
index = referenceArray[0];
|
|
21666
|
+
}
|
|
21667
|
+
const page = document.getPage(index);
|
|
21668
|
+
if (page) {
|
|
21669
|
+
const mode = referenceArray[1];
|
|
21670
|
+
if (mode.name === 'FitBH' || mode.name === 'FitH') {
|
|
21671
|
+
const top = referenceArray[2];
|
|
21672
|
+
const topValue = (typeof top !== 'undefined' && top !== null) ? (page.size[1] - top) : 0;
|
|
21673
|
+
this._destination = new PdfDestination(page, [0, topValue]);
|
|
21674
|
+
if (typeof top === 'undefined' || top === null) {
|
|
21675
|
+
this._destination._setValidation(false);
|
|
21672
21676
|
}
|
|
21673
|
-
|
|
21674
|
-
|
|
21675
|
-
|
|
21676
|
-
|
|
21677
|
-
|
|
21678
|
-
|
|
21679
|
-
|
|
21680
|
-
|
|
21681
|
-
|
|
21682
|
-
|
|
21683
|
-
if ((typeof left !== 'undefined' && left !== null) || (typeof top !== 'undefined' && top !== null)
|
|
21684
|
-
|| (typeof zoom !== 'undefined' && zoom !== null)) {
|
|
21685
|
-
this._destination._setValidation(false);
|
|
21686
|
-
}
|
|
21677
|
+
}
|
|
21678
|
+
else if (mode.name === 'XYZ') {
|
|
21679
|
+
const left = referenceArray[2];
|
|
21680
|
+
const top = referenceArray[3];
|
|
21681
|
+
const zoom = referenceArray[4];
|
|
21682
|
+
const topValue = (typeof top !== 'undefined' && top !== null) ? (page.size[1] - top) : 0;
|
|
21683
|
+
const leftValue = (typeof left !== 'undefined' && left !== null) ? left : 0;
|
|
21684
|
+
this._destination = new PdfDestination(page, [leftValue, topValue]);
|
|
21685
|
+
if (typeof zoom !== 'undefined' && zoom !== null) {
|
|
21686
|
+
this._destination.zoom = zoom;
|
|
21687
21687
|
}
|
|
21688
|
-
|
|
21689
|
-
|
|
21690
|
-
|
|
21691
|
-
const bottom = referenceArray[3];
|
|
21692
|
-
const right = referenceArray[4];
|
|
21693
|
-
const top = referenceArray[5];
|
|
21694
|
-
this._destination = new PdfDestination(page, [left, bottom, right, top]);
|
|
21695
|
-
}
|
|
21688
|
+
if ((typeof left !== 'undefined' && left !== null) || (typeof top !== 'undefined' && top !== null)
|
|
21689
|
+
|| (typeof zoom !== 'undefined' && zoom !== null)) {
|
|
21690
|
+
this._destination._setValidation(false);
|
|
21696
21691
|
}
|
|
21697
|
-
|
|
21698
|
-
|
|
21699
|
-
|
|
21692
|
+
}
|
|
21693
|
+
else if (mode.name === 'FitR') {
|
|
21694
|
+
if (referenceArray.length === 6) {
|
|
21695
|
+
const left = referenceArray[2];
|
|
21696
|
+
const bottom = referenceArray[3];
|
|
21697
|
+
const right = referenceArray[4];
|
|
21698
|
+
const top = referenceArray[5];
|
|
21699
|
+
this._destination = new PdfDestination(page, [left, bottom, right, top]);
|
|
21700
21700
|
}
|
|
21701
21701
|
}
|
|
21702
|
+
else if (mode.name === 'Fit') {
|
|
21703
|
+
this._destination = new PdfDestination(page);
|
|
21704
|
+
this._destination.mode = PdfDestinationMode.fitToPage;
|
|
21705
|
+
}
|
|
21702
21706
|
}
|
|
21703
21707
|
}
|
|
21704
21708
|
}
|
|
@@ -40691,22 +40695,26 @@ class PdfForm {
|
|
|
40691
40695
|
if (page && document) {
|
|
40692
40696
|
for (let i = 0; i < this._fieldCollection.length; i++) {
|
|
40693
40697
|
const field = this._fieldCollection[Number.parseInt(i.toString(), 10)];
|
|
40694
|
-
|
|
40695
|
-
|
|
40696
|
-
|
|
40697
|
-
|
|
40698
|
-
|
|
40699
|
-
|
|
40700
|
-
|
|
40701
|
-
|
|
40702
|
-
|
|
40703
|
-
|
|
40704
|
-
|
|
40705
|
-
|
|
40706
|
-
|
|
40707
|
-
|
|
40708
|
-
|
|
40709
|
-
|
|
40698
|
+
if (field.page) {
|
|
40699
|
+
const index = _getPageIndex(document, field.page._pageDictionary);
|
|
40700
|
+
if (index >= 0) {
|
|
40701
|
+
if (fieldCollection.has(index)) {
|
|
40702
|
+
value = fieldCollection.get(index);
|
|
40703
|
+
value.push(field);
|
|
40704
|
+
}
|
|
40705
|
+
else {
|
|
40706
|
+
value = [];
|
|
40707
|
+
value.push(field);
|
|
40708
|
+
fieldCollection.set(index, value);
|
|
40709
|
+
}
|
|
40710
|
+
const page = document.getPage(index);
|
|
40711
|
+
if (!this._tabCollection.has(index)) {
|
|
40712
|
+
this._tabCollection.set(index, page.tabOrder);
|
|
40713
|
+
}
|
|
40714
|
+
if (setTabOrder) {
|
|
40715
|
+
page.tabOrder = this._tabCollection.get(index);
|
|
40716
|
+
}
|
|
40717
|
+
}
|
|
40710
40718
|
}
|
|
40711
40719
|
}
|
|
40712
40720
|
let fieldsCount = 0;
|