TX Text Control .NET for WPF

DocumentLevelJavaScriptActions Property

Property|Introduced in 22.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

Specifies an array of strings containing Javascript. The scripts are embedded in a PDF document at document level and they are executed, when the PDF document is opened. When the document is saved as PDF/A the scripts are not embedded.

Syntax

public string[] DocumentLevelJavaScriptActions { get; set; }

Examples

The following example explicitly removes document-level script actions while producing a clean PDF export.

SaveSettings saveSettings = new()
{
    DocumentLevelJavaScriptActions = Array.Empty<string>()
};
textControl.Save("clean-report.pdf", StreamType.AdobePDF, saveSettings);

Limitations

PDF only, not PDF/A.