Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 378

Previous Page 377   Index   Next Page 379

Function Reference
Page 378 of 750
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