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

DynaPDF Manual - Page 117

Previous Page 116   Index   Next Page 118

Function Reference
Page 117 of 750
If NumColorants is zero the functions deletes existing definitions of spot colorants in the DeviceN or
NChannel color space. Otherwise, existing definitions will be overridden.
Encoding of Colorant Names
Colorant names are interpreted in the code page 1252 by default. Because colorant names are stored
in UTF-8 Unicode format in PDF, it is also possible to pass UTF-8 encoded Unicode strings to the
function. However, the function must be able to distinguish between both string formats. To achieve
this, the parameter NumColorants accepts the special flag 0x10000000 that specifies that the Colorants
array contains UTF-8 encoded strings. The flag must be combined with the number of colorants with
a binary or operator:
numColorants |= 0x10000000;
// C/C++, C#
numColorants
= numColorants Or &H10000000 // Visual Basic
numColorants := numColorants or $10000000
// Delphi
Remarks:
The definition of spot colors is required to enable the output preview in Adobe's Acrobat.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
AddFieldToFormAction
Syntax:
SI32 pdfAddFieldToFormAction(
const PPDF* IPDF, // Instance pointer
UI32 Action,
// Handle of a submit or reset form action
UI32 AField,
// Handle of a field that should be added to array
LBOOL Include)
// Include or exclude this field from submitting?
Instead of simply submitting all field values of an interactive form to a web server, it is also possible
to submit the values of specific fields only. A submit form and reset form action can hold an optional
array of fields which can be included or excluded from the action. For example, if a form contains 20
fields which all should be submitted to the web server apart from two of those fields, then add the
two fields to the submit form action and set the parameter Include to false.
Note, that parameter Include is handled reversed if the submit flag sfExclude is set (see also
CreateSubmitAction(), CreateResetAction()). The fields are then excluded if Include is true and vice
versa.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: AddDeviceNSeparations

Next topic: AddFileComment