Skip to content

Commit bf2c88e

Browse files
Merge branch 'development' of https://github.com/syncfusion-content/document-processing-docs into 1013996-SmartDataExtractor
2 parents e9f8e02 + 1844ec5 commit bf2c88e

80 files changed

Lines changed: 3732 additions & 2253 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Document-Processing-toc.html

Lines changed: 51 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1090,6 +1090,9 @@
10901090
<li><a href="/document-processing/pdf/pdf-viewer/react/how-to/custom-fonts">Custom fonts</a></li>
10911091
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/form-field-events">Form Field events</a></li>
10921092
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/form-fields-api">APIs</a></li>
1093+
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/flatten-form-fields">Flatten form fields</a></li>
1094+
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/read-form-field-values">Read form fields</a></li>
1095+
<li><a href="/document-processing/pdf/pdf-viewer/react/forms/submit-form-data">Submit form data</a></li>
10931096
</ul>
10941097
</li>
10951098
<li><a href="/document-processing/pdf/pdf-viewer/react/organize-pages/overview">Organize Pages</a>
@@ -1930,15 +1933,33 @@
19301933
<li>
19311934
UI
19321935
<ul>
1933-
<li><a href="/document-processing/pdf/pdf-viewer/maui/Toolbar">Toolbar</a></li>
1936+
<li>
1937+
<a href="/document-processing/pdf/pdf-viewer/maui/Toolbar">Toolbar</a>
1938+
<ul>
1939+
<li><a href="/document-processing/pdf/pdf-viewer/maui/Toolbar">Overview</a></li>
1940+
<li><a href="/document-processing/pdf/pdf-viewer/maui/Toolbar-Customization">Customize Toolbar</a></li>
1941+
</ul>
1942+
</li>
19341943
<li><a href="/document-processing/pdf/pdf-viewer/maui/UI-Customization">Customization</a></li>
19351944
</ul>
19361945
</li>
19371946
<li><a href="/document-processing/pdf/pdf-viewer/maui/Magnification">Magnification</a></li>
19381947
<li><a href="/document-processing/pdf/pdf-viewer/maui/Text-Search">Text Search</a></li>
19391948
<li><a href="/document-processing/pdf/pdf-viewer/maui/Text-Selection">Text Selection</a></li>
19401949
<li><a href="/document-processing/pdf/pdf-viewer/maui/Redaction">Redaction</a></li>
1941-
<li><a href="/document-processing/pdf/pdf-viewer/maui/Form-Filling">Form Filling</a></li>
1950+
<li>
1951+
<a href="/document-processing/pdf/pdf-viewer/maui/Form-Filling-Overview">Form Filling</a>
1952+
<ul>
1953+
<li><a href="/document-processing/pdf/pdf-viewer/maui/Form-Filling-Overview">Overview</a></li>
1954+
<li><a href="/document-processing/pdf/pdf-viewer/maui/Form-Filling-Edit">Edit Form Fields</a></li>
1955+
<li><a href="/document-processing/pdf/pdf-viewer/maui/Form-Filling-Collection">Form Field Collection</a></li>
1956+
<li><a href="/document-processing/pdf/pdf-viewer/maui/Form-Filling-Customization">Customize Form Fields</a></li>
1957+
<li><a href="/document-processing/pdf/pdf-viewer/maui/Form-Filling-Show-Hide">Show and Hide Form Fields</a></li>
1958+
<li><a href="/document-processing/pdf/pdf-viewer/maui/Form-Filling-Validation">Form Field Validation</a></li>
1959+
<li><a href="/document-processing/pdf/pdf-viewer/maui/Form-Filling-Events">Form Field Events</a></li>
1960+
<li><a href="/document-processing/pdf/pdf-viewer/maui/Form-Filling-Import-Export">Import and Export Form Data</a></li>
1961+
</ul>
1962+
</li>
19421963
<li>
19431964
<a href="/document-processing/pdf/pdf-viewer/maui/Annotations-Overview">Annotations</a>
19441965
<ul>
@@ -3153,6 +3174,34 @@
31533174
</li>
31543175
</ul>
31553176
</li>
3177+
<li>
3178+
<li>SmartDataExtractor
3179+
<ul>
3180+
<li>
3181+
<a href="/document-processing/smartdataextractor/smartformrecognizer/net/overview">SmartFormRecognizer</a>
3182+
<li> NET
3183+
<ul>
3184+
<li>
3185+
<a href="/document-processing/smartdataextractor/smartformrecognizer/net/smart-form-recognizer">OverView</a>
3186+
</li>
3187+
<li>
3188+
<a href="/document-processing/smartdataextractor/smartformrecognizer/net/assemblies-required">Assemblies Required</a>
3189+
</li>
3190+
<li>
3191+
<a href="/document-processing/smartdataextractor/smartformrecognizer/net/nuGet-packages-required">NuGet Packages Required</a>
3192+
</li>
3193+
<li>
3194+
<a href="/document-processing/smartdataextractor/smartformrecognizer/net/working-with-recognize-option">Working With Recognize Options</a>
3195+
</li>
3196+
<li>
3197+
<a href="/document-processing/smartdataextractor/smartformrecognizer/net/recognize-forms">Recognize Forms</a>
3198+
</li>
3199+
</ul>
3200+
</li>
3201+
</li>
3202+
</ul>
3203+
</li>
3204+
</li>
31563205
<li>
31573206
<a href="/document-processing/word/overview">Word</a>
31583207
<ul>

Document-Processing/Excel/Spreadsheet/React/Open-Excel-File/from-google-drive.md renamed to Document-Processing/Excel/Spreadsheet/React/open-excel-file/from-google-drive.md

File renamed without changes.

Document-Processing/Excel/Spreadsheet/React/Save-Excel-File/to-google-drive.md renamed to Document-Processing/Excel/Spreadsheet/React/save-excel-file/to-google-drive.md

File renamed without changes.

Document-Processing/PDF/PDF-Library/NET/Working-with-Pages.md

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1590,3 +1590,122 @@ loadedDocument.Close(True)
15901590
{% endtabs %}
15911591

15921592
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/Pages/Insert-New-Page-in-Existing-PDF-with-Same-Size/.NET).
1593+
1594+
## Page-level actions in PDF documents
1595+
1596+
Added full support for page‑level actions in the .NET PDF library, enabling developers to add, retrieve, edit, and remove actions triggered by PDF page events such as `OnOpen` and `OnClose`.
1597+
1598+
Refer to the following code example to define custom behavior for PDF page‑level actions.
1599+
1600+
{% tabs %}
1601+
1602+
{% highlight c# tabtitle="C# [Cross-platform]" %}
1603+
1604+
using Syncfusion.Pdf;
1605+
using Syncfusion.Pdf.Interactive;
1606+
1607+
// Create a new PDF document.
1608+
using (PdfDocument document = new PdfDocument())
1609+
{
1610+
// Add a page to the document.
1611+
PdfPage page1 = document.Pages.Add();
1612+
document.Actions.AfterOpen =
1613+
// Create and add new JavaScript action to execute when the first page opens
1614+
Page1.Actions.OnOpen = new PdfJavaScriptAction("app.alert(\"Welcome! This page has just been opened.\");");
1615+
// Create and add new URI action to execute when the first page closes
1616+
Page1.Actions.OnClose = new PdfUriAction("http://www.google.com");
1617+
// Add second page to the document.
1618+
PdfPage page2 = document.Pages.Add();
1619+
// Create a sound action
1620+
PdfSoundAction soundAction = new PdfSoundAction("Startup.wav");
1621+
soundAction.Sound.Bits = 16;
1622+
soundAction.Sound.Channels = PdfSoundChannels.Stereo;
1623+
soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
1624+
soundAction.Volume = 0.9f;
1625+
// Set the sound action to execute when the second page opens
1626+
Page2.Actions.OnOpen = soundAction;
1627+
// Create and add new Launch action to execute when the second page closes
1628+
Page2.Actions.OnClose = new PdfLaunchAction("logo.png");
1629+
// Removing the close action on first page
1630+
Page1.Actions.OnClose = null;
1631+
// Removing both open and close actions on second page
1632+
Page2.Actions.Clear(true);
1633+
//Save the document
1634+
document.Save("Output.pdf");
1635+
}
1636+
1637+
{% endhighlight %}
1638+
1639+
{% highlight c# tabtitle="C# [Windows-specific]" %}
1640+
1641+
using Syncfusion.Pdf;
1642+
using Syncfusion.Pdf.Interactive;
1643+
1644+
// Create a new PDF document.
1645+
using (PdfDocument document = new PdfDocument())
1646+
{
1647+
// Add a page to the document.
1648+
PdfPage page1 = document.Pages.Add();
1649+
document.Actions.AfterOpen =
1650+
// Create and add new JavaScript action to execute when the first page opens
1651+
Page1.Actions.OnOpen = new PdfJavaScriptAction("app.alert(\"Welcome! This page has just been opened.\");");
1652+
// Create and add new URI action to execute when the first page closes
1653+
Page1.Actions.OnClose = new PdfUriAction("http://www.google.com");
1654+
// Add second page to the document.
1655+
PdfPage page2 = document.Pages.Add();
1656+
// Create a sound action
1657+
PdfSoundAction soundAction = new PdfSoundAction("Startup.wav");
1658+
soundAction.Sound.Bits = 16;
1659+
soundAction.Sound.Channels = PdfSoundChannels.Stereo;
1660+
soundAction.Sound.Encoding = PdfSoundEncoding.Signed;
1661+
soundAction.Volume = 0.9f;
1662+
// Set the sound action to execute when the second page opens
1663+
Page2.Actions.OnOpen = soundAction;
1664+
// Create and add new Launch action to execute when the second page closes
1665+
Page2.Actions.OnClose = new PdfLaunchAction("logo.png");
1666+
// Removing the close action on first page
1667+
Page1.Actions.OnClose = null;
1668+
// Removing both open and close actions on second page
1669+
Page2.Actions.Clear(true);
1670+
//Save the document
1671+
document.Save("Output.pdf");
1672+
}
1673+
1674+
{% endhighlight %}
1675+
1676+
{% highlight vb.net tabtitle="VB.NET [Windows-specific]" %}
1677+
1678+
Imports Syncfusion.Pdf
1679+
Imports Syncfusion.Pdf.Interactive
1680+
1681+
' Create a new PDF document.
1682+
Using document As New PdfDocument()
1683+
' Add a page to the document.
1684+
Dim page1 As PdfPage = document.Pages.Add()
1685+
' Create and add new JavaScript action to execute when the first page opens
1686+
page1.Actions.OnOpen = New PdfJavaScriptAction("app.alert(""Welcome! This page has just been opened."");")
1687+
' Create and add new URI action to execute when the first page closes
1688+
page1.Actions.OnClose = New PdfUriAction("http://www.google.com")
1689+
' Add second page to the document.
1690+
Dim page2 As PdfPage = document.Pages.Add()
1691+
' Create a sound action
1692+
Dim soundAction As New PdfSoundAction("Startup.wav")
1693+
soundAction.Sound.Bits = 16
1694+
soundAction.Sound.Channels = PdfSoundChannels.Stereo
1695+
soundAction.Sound.Encoding = PdfSoundEncoding.Signed
1696+
soundAction.Volume = 0.9F
1697+
' Set the sound action to execute when the second page opens
1698+
page2.Actions.OnOpen = soundAction
1699+
' Create and add new Launch action to execute when the second page closes
1700+
page2.Actions.OnClose = New PdfLaunchAction("logo.png")
1701+
' Removing the close action on first page
1702+
page1.Actions.OnClose = Nothing
1703+
' Removing both open and close actions on second page
1704+
page2.Actions.Clear(True)
1705+
' Save the document
1706+
document.Save("Output.pdf")
1707+
End Using
1708+
1709+
{% endhighlight %}
1710+
1711+
{% endtabs %}

Document-Processing/PDF/PDF-Library/javascript/DigitalSignature.md

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -521,6 +521,69 @@ ldocument.destroy();
521521
{% endhighlight %}
522522
{% endtabs %}
523523

524+
## Adding a timestamp in digital signature
525+
526+
This example shows how to apply a digital signature with a trusted timestamp, ensuring the signature remains valid even after the certificate expires. A timestamp callback contacts a Time Stamping Authority (TSA) to add an official time record to the signature. This provides long‑term proof of when the document was signed.
527+
528+
{% tabs %}
529+
{% highlight typescript tabtitle="TypeScript" %}
530+
531+
import { PdfDocument, PdfPage, PdfForm, PdfSignatureField, PdfSignature, CryptographicStandard, DigestAlgorithm } from '@syncfusion/ej2-pdf';
532+
533+
// Load the document
534+
let document: PdfDocument = new PdfDocument(data);
535+
// Gets the first page of the document
536+
let page: PdfPage = document.getPage(0);
537+
// Access the PDF form
538+
let form: PdfForm = document.form;
539+
// Create a new signature field
540+
let field: PdfSignatureField = new PdfSignatureField(page, 'Signature', {x: 10, y: 10, width: 100, height: 50});
541+
// Create a timestamp callback
542+
async function timestampCallback(request: Uint8Array): Promise<{ response: Uint8Array }> {
543+
// Implement timestamp response logic here
544+
return { response: new Uint8Array() }; // Placeholder return
545+
}
546+
// Create a new signature using PFX data, private key and call back function for timestamp
547+
const signature: PdfSignature = PdfSignature.create(certData, password, { cryptographicStandard: CryptographicStandard.cms, digestAlgorithm: DigestAlgorithm.sha256 }, timestampCallback);
548+
// Sets the signature to the field
549+
field.setSignature(signature);
550+
// Add the field into PDF form
551+
form.add(field);
552+
// Save the document
553+
await document.saveAsync('output.pdf');
554+
// Destroy the document
555+
document.destroy();
556+
557+
{% endhighlight %}
558+
{% highlight javascript tabtitle="JavaScript" %}
559+
560+
// Load the document
561+
var document = new ej.pdf.PdfDocument(data);
562+
// Gets the first page of the document
563+
var page = document.getPage(0);
564+
// Access the PDF form
565+
var form = document.form;
566+
// Create a new signature field
567+
var field = new ej.pdf.PdfSignatureField(page, 'Signature', {x: 10, y: 10, width: 100, height: 50});
568+
// Create a timestamp callback
569+
async function timestampCallback(request) {
570+
// Implement timestamp response logic here
571+
return { response: new Uint8Array() }; // Placeholder return
572+
}
573+
// Create a new signature using PFX data, private key and call back function for timestamp
574+
const signature = PdfSignature.create(certData, password, { cryptographicStandard: ej.pdf.CryptographicStandard.cms, digestAlgorithm: ej.pdf.DigestAlgorithm.sha256 }, timestampCallback);
575+
// Sets the signature to the field
576+
field.setSignature(signature);
577+
// Add the field into PDF form
578+
form.add(field);
579+
// Save the document
580+
await document.saveAsync('output.pdf');
581+
// Destroy the document
582+
document.destroy();
583+
584+
{% endhighlight %}
585+
{% endtabs %}
586+
524587
## Drawing text/image in the Signature Appearance
525588

526589
This example demonstrates how to create a visible signature field, apply a CMS (SHA-256) digital signature with signer information, customize the signature appearance using a base64-encoded image, and save the signed PDF document.

0 commit comments

Comments
 (0)