DynaPDF Manual - Page 567

Previous Page 566   Index   Next Page 568

Function Reference
Page 567 of 839
The parameter Style sets the style flags fsUnderlined, fsStriked, or fsVerticalLayout only. It is also
possible to emulate font styles with manually loaded fonts. Use the function ChangeFontStyleEx() if
a font style should be emulated.
If the font name is known by the caller then it is also possible to set the font later with SetFont().
However, for proper behaviour manually loaded fonts should always be set with ChangeFont().
If SetFont() is used then there is no guarantee that the function loads exactly this font because the
function tries to load the best match according to the provided parameters.
The parameter Index is used to load a specific sub font of a TrueType Collection. If a normal font is
loaded or if the index is unknown set the parameter to zero. Note that the parameter is used when
DynaPDF performs the duplicate check.
A font file that was loaded with function must not be deleted or modified before the PDF file was
closed or discarded.
Like all other fonts, manually loaded fonts are unloaded when the PDF file is closed or discarded
with FreePDF().
The function is implemented in an Ansi and Unicode compatible variant. The Unicode version is
preferred on Windows because Unicode is the default string format that DynaPDF uses for font files
on this platform.
Unicode file paths are converted to UTF-8 on non-Windows operating systems.
Return values:
If the function succeeds the return value is the font handle, a value greater or equal zero. If the
function fails the return value is a negative error code.
LBOOL pdfLoadFDFData(
const PPDF* IPDF,
// Instance pointer
const char* FileName, // File path of the FDF file
const char* Password, // Defined for future use, should be NULL
UI32 Flags)
// Defined for future use, should be 0
The function loads form data from a FDF file (Forms Data Format). The corresponding form must be
imported before the function can be used. See ImportPDFFile() for further information.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.

Previous topic: TrueType Collections, LoadFontEx

Next topic: LoadFDFDataEx, LoadHeaderFooterSettings