DynaPDF Manual - Page 682

Previous Page 681   Index   Next Page 683

Function Reference
Page 682 of 860
ReplaceFontEx
Syntax:
SI32 pdfReplaceFontEx(
const PPDF* IPDF,
// Instance pointer
const PFNT* PDFFont,
// Parameter of the OnFontNotFount callback
const char* FontFile, // Path of the font file to be loaded
LBOOL Embed)
// Must be true when creating PDF/A files
The function replaces a PDF font with another one. The font file can be loaded directly. It is not
required to install the font on the system. The function can be called in the OnFontNotFound
callback function of the function CheckConformance(). The return value of the callback function
should be the return value of this function. The parameter PDFFont is a parameter of the callback
function. The pointer is required and must be passed unchanged to the function.
Return value:
If the function succeeds the return value is zero. If the function fails the return value is a negative
error code.
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.
 

Previous topic: ReplaceFont, ReOpenImportFile

Next topic: ReplaceICCProfileEx, ReplaceImage