DynaPDF Manual - Page 129

Previous Page 128   Index   Next Page 130

Function Reference
Page 129 of 839
Remarks:
Process colorant names must be defined in the code page 1252 (WinAnsi).
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
AddDeviceNSeparations
Syntax:
LBOOL pdfAddDeviceNSeparations(
const PPDF* IPDF,
// Instance pointer
UI32 DeviceNCS,
// Handle of a DeviceN or NChannel color space
const char** Colorants, // Array of colorant names
UI32* SeparationCS,
// Array of Separation color space handles
UI32 NumColorants)
// Number of colorants and handles
The function adds a dictionary to a DeviceN or NChannel color space that describes the spot
colorants which are used in the color space.
This dictionary provides information about the individual colorants that may be useful to some
applications. In particular, the alternate color space and tint transformation function of a Separation
color space describe the appearance of that colorant alone, whereas those of a DeviceN color space
describe only the appearance of its colorants in combination.
The array Colorants holds the spot colorant names and the array SeparationCS holds the
corresponding Separation color space handles. The colorant names in the array must match the
names in the corresponding Separation color spaces. In addition, the colorants must be included in
the DeviceN or NChannel color space.
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.
 

Previous topic: AddContinueText, AddDeviceNProcessColorants

Next topic: AddDPartNode, Document Part Metadata (DPM)