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

DynaPDF Manual - Page 245

Previous Page 244   Index   Next Page 246

Function Reference
Page 245 of 750
The length of the color table in bytes must be NumColors * NumComponents.
Notice:
Non-device color spaces cannot be used for interactive objects such as annotations or form fields. The
active color space must always be changed to a device color space before creating interactive objects,
see SetColorSpace(). Note also that annotations support DeviceRGB only. Form fields support
DeviceGray, DeviceRGB, and DeviceCMYK.
Remarks:
This function does not activate the color space in the graphics state. Use the function
SetExtColorSpace() to activate the color space in the graphics state. To set a color of the indexed color
space pass the color index to SetFillColor(), SetStrokeColor(), or SetColors().
Return values:
If the function succeeds the return value is a color space handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
CreateJSAction
Syntax:
SI32 pdfCreateJSAction(
const PPDF* IPDF,
// Instance pointer
const char* Script) // Must be one or more JavaScript functions
This function creates a JavaScript action. A JavaScript Action causes a script to be compiled and
executed by the JavaScript interpreter of Adobe's Acrobat. Depending on the nature of the scripts,
this can cause various interactive form fields in the document to update their values or change their
visual appearances.
The parameter Script must be a valid JavaScript. The function does not check whether the script is
valid.
A JavaScript action can be added to a field, page, or to the Catalog object with AddActionToObj().
Remarks:
This function is implemented in an Ansi and Unicode compatible version. 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 by Adobe's Acrobat. Actions must
be added to a PDF object with AddActionToObj().
Return values:
If the function succeeds the return value is the action handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
 

Previous topic: CreateIndexedColorSpace

Next topic: CreateLaunchAction