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

DynaPDF Manual - Page 692

Previous Page 691   Index   Next Page 693

Function Reference
Page 692 of 750
#define E_SYNTAX_ERROR 0x04000000
#define E_FONT_ERROR
#define E_FILE_ERROR
At time of publication only one flag is set at any one time. Future versions may be set multiple flags,
e.g. E_SYNTAX_ERROR and E_WARNING. Because of this, it is recommended to mask out the error
type with a bitwise and operator.
If the callback function returns a value other than zero (0), processing stops immediately.
Return values:
If the function succeeds the return value is 1. If the function fails the return value is 0.
LBOOL pdfSetOnPageBreakProc(
const PPDF* IPDF,
// Instance pointer
const void* Data,
// User defined pointer or NULL
const void* OnBreakProc) // Callback function, see below
#define PDF_CALL __stdcall
// Windows only, otherwise empty
typedef SI32 PDF_CALL TOnPageBreakProc(
const void* Data,
// User defined pointer
double LastPosX,
// Last x-coordinate of the string
double LastPosY,
// Last y-coordinate of the string
LBOOL PageBreak);
// True, if a manual page break occurred
The function sets a callback function which is called by WriteFText() when a page break occurred.
The parameter Data holds a user defined pointer which is passed unchanged to the callback function.
If this pointer is not required set it to NULL. The calling convention of the callback function is
standard call on Windows.
The Visual Basic and VB .Net interfaces use events instead of a callback function, see Language
Binding Visual Basic or VB .Net for further information). In VB .Net you can use a callback function
or the event. The OnPageBreakProc event must be connected manually in these interfaces to avoid
different runtime behaviour of the function WriteFText(). To enable the event call the function
ConnectPageBreakEvent() in VB or VB .Net.
The parameter PageBreak of the callback function specifies why the callback function was called:
If true, a page break tag in the string was found (see WriteFText() for further information).
If false, the output rectangle was filled with text entirely.
The usage of the callback function is described in detail under WriteFText(). However, the following
return values of the callback function can be used the change the text alignment:

Previous topic: SetOnErrorProc

Next topic: SetOrientation