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

DynaPDF Manual - Page 748

Previous Page 747   Index   Next Page 749

Function Reference
Page 748 of 750
As you can see, the first column is left aligned, the second is justified and the third is right aligned.
By using manual page breaks it is possible to get full control over the formatting algorithm.
The parameter PageBreak of the callback is set to true if a page break tag was found, otherwise it is
always false. Because of this, it is possible to distinguish between a manual page break and a page
break that occurred due to a filled rectangle.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
WriteFTextEx
Syntax:
LBOOL pdfWriteFTextEx(
const PPDF* IPDF,
// Instance pointer
double PosX,
// X-Coordinate of output rectangle
double PosY,
// Y-Coordinate of output rectangle
double Width,
// Width of output rectangle
double Height,
// Height of output rectangle or -1
TTextAlign Align,
// Base alignment
const char* AText) // Null-terminated string to be printed
The function prints a formatted text exactly in the same way as WriteFText(). However, the function
contains already the parameters to set the output rectangle. The function supports a callback
function to enable the output of multi-column text in the same way as WriteFText(). However, if no
callback function is set, the text continues on the next page by using the same output rectangle.
To avoid a page break set the parameter Height to -1. Manual page breaks which can be created
with the command tag \np# are still executed. See WriteFText() for further information.
This function is implemented in an Ansi and Unicode compatible version.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
WriteText
Syntax:
LBOOL pdfWriteText(
const PPDF* IPDF,
// Instance pointer
double PosX,
// X-Coordinate of the text
double PosY,
// Y-Coordinate of the text
const char* AText) // Null-terminated string to be printed
The function prints a text on the current open page, template, or pattern. The point PosX, PosY
defines the baseline of the text if the coordinate system is bottom-up, otherwise the top-left corner of
the text's bounding box. The font origin can be changed with the function SetFontOrigin().
 

Previous topic: How to create multi-column text?

Next topic: WriteTextMatrix