PdfFormScriptOptions Class

The options of PdfFormScriptSession: the limits of the scripts and the callbacks of the host.

public sealed class PdfFormScriptOptions

Constructors

NameDescription
PdfFormScriptOptions()

PdfFormScriptOptions()

PdfFormScriptOptions.cs
public PdfFormScriptOptions()

No documentation is available.

Properties

NameDescription
AlertGets the callback of app.alert, or null (the default) to ignore the alerts. The alerts are reported in the diagnostics either way.
CancellationTokenGets the token that cancels the scripts.
DefaultGets the default options.
MaxStatementsGets the number of statements a script may run, each time it runs. The default is 1,000,000.
MemoryLimitGets the bytes a script may allocate, each time it runs. The default is 64 MB.
RecursionLimitGets the depth of the calls of a script. The default is 1,000.
ThrowOnScriptErrorGets a value indicating whether an error of a script throws PdfFormScriptException. The default is false: the error is reported in the diagnostics and the other scripts run, as viewers do.
TimeoutGets the time a script may run, each time it runs. The default is one second.

Gets the callback of app.alert, or null (the default) to ignore the alerts. The alerts are reported in the diagnostics either way.

public Action<string>? Alert { get; init; }

Property value

Action<string>?

CancellationToken

PdfFormScriptOptions.cs

Gets the token that cancels the scripts.

public CancellationToken CancellationToken { get; init; }

Property value

CancellationToken

Gets the default options.

public static PdfFormScriptOptions Default { get; }

Property value

PdfFormScriptOptions

Gets the number of statements a script may run, each time it runs. The default is 1,000,000.

public long MaxStatements { get; init; }

Property value

long

Gets the bytes a script may allocate, each time it runs. The default is 64 MB.

public long MemoryLimit { get; init; }

Property value

long

Gets the depth of the calls of a script. The default is 1,000.

public int RecursionLimit { get; init; }

Property value

int

ThrowOnScriptError

PdfFormScriptOptions.cs

Gets a value indicating whether an error of a script throws PdfFormScriptException. The default is false: the error is reported in the diagnostics and the other scripts run, as viewers do.

public bool ThrowOnScriptError { get; init; }

Property value

bool

Gets the time a script may run, each time it runs. The default is one second.

public TimeSpan Timeout { get; init; }

Property value

TimeSpan