Xojo Conferences
XDCMay2019MiamiUSA
MBSOct2019CologneDE

DynaPDF Manual - Page 383

Previous Page 382   Index   Next Page 384

Function Reference
Page 383 of 766
typedef enum
{
taLeft,
taCenter,
taRight,
taJustify
}TTextAlign;
The function measures the height of a formatted text block. Before calling this function a font (see
SetFont()) and the output rectangle must be set with the function SetTextRect(). The parameter Height
of SetTextRect() should be set to -1 to avoid page breaks. Otherwise the height of the first text block
is returned that fits into the given height of the rectangle.
The parameter AText must contain the same text (incl. format tags if any) as which should be printed
later with WriteFText().
Remarks:
This function is implemented in an Ansi and Unicode compatible version.
Return values:
If the function succeeds the return value is the height of the formatted text block. If the function fails
the return value is a negative error code.
GetFTextHeightEx
Syntax:
double pdfGetFTextHeightEx(
const PPDF* IPDF,
// Instance pointer
double Width,
// Width of output rectangle
TTextAlign Align,
// Base text alignment
const char* AText) // Formatted text
The function measures the height of a formatted text block. The function works in the same way as
GetFTextHeight() but the output rectangle must not be set manually beforehand.
The height of the output rectangle is set to -1 to avoid a page break during measuring.
The parameter AText must contain the same text (incl. format tags if any) as which should be printed
later with WriteFText().
Remarks:
This function is implemented in an Ansi and Unicode compatible version.
Return values:
If the function succeeds the return value is the height of the formatted text block. If the function fails
the return value is a negative error code.
 

Previous topic: GetFTextHeight

Next topic: GetGlyphOutline