Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 164

Previous Page 163   Index   Next Page 165

Function Reference
Page 164 of 750
ChangeFontStyleEx
Syntax:
LBOOL pdfChangeFontStyleEx(
const PPDF* IPDF, // Instance pointer
TFStyle Style)
// New font style
The function changes the font style of a font like ChangeFontStyle() but it accepts also font styles like
fsBold or fsItalic. These flags can be used to explicitely enable the emulation of a missing font style.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
ChangeJavaScript
Syntax:
SI32 pdfChangeJavaScript(
const PPDF* IPDF,
// Instance pointer
UI32 AHandle,
// Handle of global JavaScript
const char* NewScript) // New JavaScript
The function replaces a global JavaScript with a new one. The parameter AHandle must be a valid
handle of a global JavaScript. The parameter NewScript must be a valid JavaScript. The script is not
checked by DynaPDF whether it is valid or not. Note that older Acrobat versions do not support all
JavaScript functions. Due to several bugs in certain Acrobat versions invalid scripts can cause access
violations in Adobe's Acrobat. Test your scripts carefully with all Acrobat versions which must be
supported.
Remarks:
This function is implemented in an Ansi and Unicode compatible version. However, because
JavaScript 1.2 is not Unicode compatible, Unicode encoded scripts are translated to a platform
specific encoding prior to interpretation by the JavaScript engine. This conversion is done in the
viewer application and can cause errors. The usage of scripts in Unicode format should be avoided if
possible.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: ChangeFontStyle

Next topic: ChangeJavaScriptName