Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

DynaPDF.GetJavaScript

Returns a global JavaScript as string.

Component Version macOS Windows Linux Server iOS SDK
DynaPDF 13.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "DynaPDF.GetJavaScript"; PDF; Index or Name )   More

Parameters

Parameter Description Example
PDF The PDF reference returned from DynaPDF.New. $pdf
Index or Name Pass either text with the name of the JavaScript or the index in range from 0 to DynaPDF.GetJavaScriptCount-1. "test"

Result

Returns text or error.

Description

Returns a global JavaScript as string.
The parameter Index must be a valid handle of a global JavaScript or the name.
To enumerate all JavaScripts of a document use the function DynaPDF.GetJavaScriptCount and then run a loop calling this function.

See also GetJavaScript function in DynaPDF manual.

Examples

Query the JavaScript of the thing we added:

Set Variable [ $r ; Value: MBS("DynaPDF.AddJavaScript"; $pdf; "test"; "function test() { return 123; }") ]
Set Variable [ $name ; Value: MBS("DynaPDF.GetJavaScript"; $pdf; "test") ]

See also

Release notes

Blog Entries

This function checks for a license.

Created 15th April 2023, last changed 15th April 2023


DynaPDF.GetJPEGQuality - DynaPDF.GetJavaScriptAction