DynaPDF Manual - Page 525

Previous Page 524   Index   Next Page 526

Function Reference
Page 525 of 839
All profile paths must be absolute paths. Otherwise it is maybe not possible to reload a profile if
necessary. DynaPDF must be able to reload the profiles if a PDF file contains ICCBased color spaces.
Initializing the color management requires a considerable amount of processing time. It is strongly
recommended to use one PDF instance as long as possible so that it must not be initialized again
when another PDF file will be rendered.
The color management can be initialized right after the PDF instance was created.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
LBOOL pdfInitColorManagementEx(
const PPDF* IPDF,
// Instance pointer
struct TPDFColorProfilesEx* Profiles, // Color profiles or NULL
TPDFColorSpace DestSpace,
// Destination color space
TPDFInitCMFlags Flags)
// See below
struct TPDFColorProfilesEx
// Must be set to sizeof(TPDFColorProfilesEx)
const void* DefInGray;
// Optional
// Optional
const void* DefInRGB;
// Optional
// Optional
const void* DefInCMYK;
// Optional, but this is the most important
// but this is the most important profile.
const void* DeviceProfile;
// Optional, must be compatible with the output color
DeviceProfileLen; // space. Default is sRGB.
const void* SoftProof;
// Optional, emulates another output device.
// 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() exactly like InitColorManagement() but accepts ICC
profile buffers instead of file paths. See InitColorManagement() for further information.
To disable color management set the parameter Profiles to NULL.

Previous topic: InitColorManagement

Next topic: InitExtGState, InitHeaderFooter