From 58abf48177894259947d36233ea258a14b5f6f3e Mon Sep 17 00:00:00 2001
From: "AzureAD\\DhakshinPrasathDhanr" <DhakshinPrasathDhanr>
Date: Mon, 30 Mar 2026 15:07:06 +0530
Subject: [PATCH] Task(1018497): Need to Update Digital Signature and Split
 Document Code Content in EJ2 PDF User Guide documentation

---
 .../javascript/DigitalSignature.md            | 32 +++++++++----------
 .../PDF-Library/javascript/Split-Documents.md | 12 +++----
 2 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md b/Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md
index 6623c7cf52..6a5af0ef87 100644
--- a/Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md
+++ b/Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md
@@ -32,12 +32,12 @@ let field: PdfSignatureField = new PdfSignatureField(page, 'Signature', {
 });
 // Create a new signature using PFX data and private key
 let sign: PdfSignature = PdfSignature.create(
+    certData,
+    password,
     {
         cryptographicStandard: CryptographicStandard.cms,
         digestAlgorithm: DigestAlgorithm.sha256
-    },
-    certData,
-    password
+    }
 );
 // Set the signature to the field
 field.setSignature(sign);
@@ -60,7 +60,7 @@ var form = document.form;
 // Create a new signature field
 var field = new ej.pdf.PdfSignatureField(page, 'Signature', {x: 10, y: 10, width: 100, height: 50});
 // Create a new signature using PFX data and private key
-var sign = ej.pdf.PdfSignature.create({cryptographicStandard: ej.pdf.CryptographicStandard.cms, digestAlgorithm: ej.pdf.DigestAlgorithm.sha256}, certData, password);
+var sign = ej.pdf.PdfSignature.create(certData, password, {cryptographicStandard: ej.pdf.CryptographicStandard.cms, digestAlgorithm: ej.pdf.DigestAlgorithm.sha256});
 // Set the signature to the field
 field.setSignature(sign);
 // Add the field into PDF form
@@ -94,12 +94,12 @@ let field: PdfSignatureField = new PdfSignatureField(page, 'Signature', {
 });
 // Create a new signature using PFX data and private key
 let sign: PdfSignature = PdfSignature.create(
+    certData,
+    password,
     {
         cryptographicStandard: CryptographicStandard.cms,
         digestAlgorithm: DigestAlgorithm.sha256
-    },
-    certData,
-    password
+    }
 );
 // Set the signature to the field
 field.setSignature(sign);
@@ -128,12 +128,12 @@ var field = new ej.pdf.PdfSignatureField(page, 'Signature', {
 });
 // Create a new signature using PFX data and private key
 var sign = ej.pdf.PdfSignature.create(
+    certData,
+    password,
     {
         cryptographicStandard: ej.pdf.CryptographicStandard.cms,
         digestAlgorithm: ej.pdf.DigestAlgorithm.sha256
-    },
-    certData,
-    password
+    }
 );
 // Set the signature to the field
 field.setSignature(sign);
@@ -875,12 +875,12 @@ let externalSignatureCallback = (
 };
 // Create a new signature using external signing with public certificate collection
 let signature: PdfSignature = PdfSignature.create(
+    externalSignatureCallback,
+    publicCertificates,
     {
         cryptographicStandard: CryptographicStandard.cms,
         algorithm: DigestAlgorithm.sha256
-    },
-    externalSignatureCallback,
-    publicCertificates
+    }
 );
 // Set the signature to the field
 field.setSignature(signature);
@@ -921,12 +921,12 @@ var externalSignatureCallback = function (data, options) {
 };
 // Create a new signature using external signing with public certificate collection
 var signature = ej.pdf.PdfSignature.create(
+    externalSignatureCallback,
+    publicCertificates,
     {
         cryptographicStandard: ej.pdf.CryptographicStandard.cms,
         algorithm: ej.pdf.DigestAlgorithm.sha256
-    },
-    externalSignatureCallback,
-    publicCertificates
+    }
 );
 // Set the signature to the field
 field.setSignature(signature);
diff --git a/Document-Processing/PDF/PDF-Library/javascript/Split-Documents.md b/Document-Processing/PDF/PDF-Library/javascript/Split-Documents.md
index ca588d9804..78c1209f64 100644
--- a/Document-Processing/PDF/PDF-Library/javascript/Split-Documents.md
+++ b/Document-Processing/PDF/PDF-Library/javascript/Split-Documents.md
@@ -26,7 +26,7 @@ document.splitEvent = documentSplitEvent;
 document.split();
 // Event to invoke while splitting PDF document data
 function documentSplitEvent(sender: PdfDocument, args: PdfDocumentSplitEventArgs): void {
-  Save.save('output_' + args.splitIndex + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
+  Save.save('output_' + args.index + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
 }
 // Destroy the document
 document.destroy();
@@ -41,7 +41,7 @@ document.splitEvent = documentSplitEvent;
 document.split();
 // Event to invoke while splitting PDF document data
 function documentSplitEvent(sender, args): void {
-  Save.save('output_' + args.splitIndex + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
+  Save.save('output_' + args.index + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
 }
 // Destroy the document
 document.destroy();
@@ -65,7 +65,7 @@ document.splitEvent = documentSplitEvent;
 document.splitByPageRanges([[0, 4], [5, 9]]);
 // Event to invoke while splitting PDF document data
 function documentSplitEvent(sender: PdfDocument, args: PdfDocumentSplitEventArgs): void {
-  Save.save('output_' + args.splitIndex + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
+  Save.save('output_' + args.index + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
 }
 // Destroy the document
 document.destroy();
@@ -80,7 +80,7 @@ document.splitEvent = documentSplitEvent;
 document.splitByPageRanges([[0, 4], [5, 9]]);
 // Event to invoke while splitting PDF document data
 function documentSplitEvent(sender, args): void {
-  Save.save('output_' + args.splitIndex + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
+  Save.save('output_' + args.index + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
 }
 // Destroy the document
 document.destroy();
@@ -104,7 +104,7 @@ document.splitEvent = documentSplitEvent;
 document.splitByFixedNumber(1);
 // Event to invoke while splitting PDF document data
 function documentSplitEvent(sender: PdfDocument, args: PdfDocumentSplitEventArgs): void {
-  Save.save('output_' + args.splitIndex + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
+  Save.save('output_' + args.index + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
 }
 // Destroy the document
 document.destroy();
@@ -119,7 +119,7 @@ document.splitEvent = documentSplitEvent;
 document.splitByFixedNumber(1);
 // Event to invoke while splitting PDF document data
 function documentSplitEvent(sender, args): void {
-  Save.save('output_' + args.splitIndex + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
+  Save.save('output_' + args.index + '.pdf', new Blob([args.pdfData], { type: 'application/pdf' }));
 }
 // Destroy the document
 document.destroy();
