DynaPDF Manual - Page 662
Previous Page 661 Index Next Page 663
Function Reference
Page 662 of 839
ReplaceICCProfile
Syntax:
SI32 pdfReplaceICCProfile(
const PPDF* IPDF,
// Instance pointer
UI32 ColorSpace,
// Color space handle
const char* ICCFile) // File path to an ICC profile
This function is used to dynamically create ICC based color spaces within the callback function
OnReplaceICCProfile of CheckConformance().
The parameter Type of the callback function contains the profile type that must be inserted. At time
of publication only Gray, RGB and CMYK profiles are requested. Because ICC profiles for grayscale
color spaces are rarely available a RGB profile can be used instead.
Notice:
The callback function OnReplaceICCProfile should return the value of this function!
Remarks:
This function is available in an Ansi and Unicode compatible version. Because UTF-16 Unicode file
paths are not supported under Linux or UNIX the file path is converted to UTF-8 before trying to
open the file on such operating systems. However, the usage of the Ansi version with an UTF-8
string is recommended on non-Windows operating systems.
Return values:
If the function succeeds the return value is zero. If the function fails the return value is a negative
error code.
ReplaceICCProfileEx
Syntax:
SI32 pdfReplaceICCProfileEx(
const PPDF* IPDF,
// Instance pointer
UI32 ColorSpace,
// Color space handle
const void* Buffer, // File buffer of an ICC profile
UI32 BufSize)
// Buffer size in bytes
The function replaces an ICC profile exactly in the same way as ReplaceICCProfile() but accepts a
file buffer as input.
Return values:
If the function succeeds the return value is zero. If the function fails the return value is a negative
error code.
Previous topic: ReOpenImportFile, ReplaceFontEx
Next topic: ReplaceImage