DynaPDF Manual - Page 461
Previous Page 460 Index Next Page 462
Function Reference
Page 461 of 860
LBOOL unicode;
UI32 len;
char* scriptA;
UI16* scriptW;
SI32 count = pdfGetJavaScriptCount();
for (i = 0; i < count; i++)
{
scriptA = pdfGetJavaScript(i, len, unicode);
if (scriptA)
{
if (unicode)
{
scriptW = (UI16*)scriptA; // String is in Unicode format
}else
{
}
}
}
Remarks:
To get a global JavaScript by using the script's name use the function GetJavaScriptEx().
Return value:
If the function succeeds the return value is the JavaScript as Ansi or Unicode string. If the function
fails the return value is NULL.
GetJavaScriptAction (obsolete)
Syntax:
char* pdfGetJavaScriptAction(
const PPDF* IPDF,
// Instance pointer
UI32 AHandle,
// Handle of a JavaScript action
UI32 ADDR Len,
// String length in characters
LBOOL ADDR Unicode) // If true, the return value is a Unicode string
The function returns the script of a JavaScript Action as string. The parameter AHandle must be a
valid handle of a JavaScript Action. 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 returned string is a pointer to the original value. Do not change or free the string.
This function is obsolete. Please use GetJavaScriptActionEx() instead.
Return value:
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: GetIsTaggingEnabled, GetItalicAngle, GetJavaScript
Next topic: GetJavaScriptAction2 (obsolete)