DynaPDF Manual - Page 524

Previous Page 523   Index   Next Page 525

Function Reference
Page 524 of 839
LBOOL pdfInitColorManagement(
const PPDF* IPDF,
// Instance pointer
struct TPDFColorProfiles* Profiles, // Color profiles or NULL
TPDFColorSpace DestSpace,
// Destination color space
TPDFInitCMFlags Flags)
// See below
struct TPDFColorProfiles
// Must be set to sizeof(TPDFColorProfile)
const char* DefInGrayA;
// Optional
const UI16* DefInGrayW;
// Optional
const char* DefInRGBA;
// Optional, sRGB is the default.
const UI16* DefInRGBW;
// Optional
const char* DefInCMYKA;
// Optional, but this is the most important
const UI16* DefInCMYKW;
// profile!
const char* DeviceProfileA; // Optional, must be compatible with the
const UI16* DeviceProfileW; // output color space. Default is sRGB.
const char* SoftProofA;
// Optional, emulates another output device.
const UI16* SoftProofW;
// Optional.
typedef enum
= 0, // Default rules.
icmBPCompensation = 1, // Black point compensation preserves the black
// point when converting CMYK colors to
// different color spaces.
icmCheckBlackPoint = 2 // If set, soft proofing will be disabled if the
// black point of the output intent is probably
// invalid. The limit is 35 for L* measured in
// Lab color space.
The function enables color management in the functions RenderPage(), RenderPageEx(),
RenderPageToImage(), and RenderPDFFile(). All color profiles are optional. Default profiles for
DeviceGray and DeviceRGB color spaces (sRGB is default) are automatically created if not provided.
The most important color profile is the CMYK profile because it is not possible to create such a
profile with build-in functions. If no CMYK profile is set DynaPDF renders CMYK only with color
management if the file contains corresponding ICCBased color spaces or an embedded CMYK
output intent.
The file paths can be defined in Ansi or Unicode format (UTF-16). Ansi strings are interpreted in the
code page 1252 on Windows and in UTF-8 Unicode on non-Windows operating systems.
It is also possible to load the ICC profiles from file buffers. See InitColorManagementEx() for further
The SoftProof profile specifies an arbitrary output color space that should be simulated.
To disable color management set the parameter Profile to NULL. Because Visual Basic 6 doesn't
accept vbNull for this parameter, call DisableColorManagement() instead. This function exists in the
VB 6 interface only.
Although Black Point Compensation (BPC) is not enabled by default, it is recommended to enable it
because it improves the rendering quality of CMYK images a lot.

Previous topic: InitBarcode2

Next topic: InitColorManagementEx