DynaPDF Manual - Page 785

Previous Page 784   Index   Next Page 786

Function Reference
Page 785 of 874
SetLeading
Syntax:
LBOOL pdfSetLeading(
const PPDF* IPDF,
// Instance pointer
double Value)
// New leading or 0
The function sets the leading (also called line height or line spacing) that is used by the functions
AddContinueText() and WriteFText() to calculate the distance between two text lines.
The default leading in PDF is the font size. However, this value is often too small and can cause
overlapping text lines. Most modern TrueType and OpenType fonts contain metrics of the
typographic leading or line height that was intended for the particular font. This value considers the
particular properties of the font and is the recommended way to calculate the line height.
The typographic line height or leading is returned by the functions GetTypoLeading() and
GetFontMetrics().
A value of 0 determines that the font size should be used as leading, this is the default behaviour.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
 

Previous topic: SetLanguage, Language Identifiers

Next topic: SetLicenseKey, SetLineAnnotParms