DynaPDF Manual - Page 445

Previous Page 444   Index   Next Page 446

Function Reference
Page 445 of 839
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
GetJavaScriptCount
Syntax:
SI32 pdfGetJavaScriptCount(
const PPDF* IPDF) // Instance pointer
The function returns the number of global JavaScripts contained in a document.
GetJavaScriptEx
Syntax:
char* pdfGetJavaScriptEx(
const PPDF* IPDF,
// Instance pointer
const char* Name,
// Name of the global JavaScript
UI32 ADDR Len,
// String length in characters
LBOOL ADDR Unicode) // If true, return value is a Unicode string
The function returns a global JavaScript as string by using the script's name instead of a handle to
identify the script. Each global JavaScript has a unique name that identifies the script; this name
must be passed to the parameter Name. See also AddJavaScript().
The parameter Len holds the string length in characters without null-terminator. If Unicode is true,
the return value is a Unicode string. Make a typecast to UI16* in the latter case. The parameters Len
and Unicode must both not be NULL.
The returned string is a pointer to the original value. Do not change or free the string.
To enumerate all JavaScripts of a document use the function GetJavaScriptCount() and use this
value in a simple for statement (see GetJavaScript() for further information).
Return values:
If the function succeeds the return value is the JavaScript as Ansi or Unicode string. If the function
fails the return value is NULL.
 

Previous topic: GetJavaScriptActionEx

Next topic: GetJavaScriptName, GetJPEGQuality, GetLanguage