Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
DynaPDF.SetPageBreakExpression
Sets page break expression.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| DynaPDF | 10.6 | Yes | Yes | Yes | Yes | Yes |
Parameters
| Parameter | Description | Example |
|---|---|---|
| The PDF reference returned from DynaPDF.New. |
Result
Returns OK or error.
Description
Sets page break expression.We can calculate this expression when the text box is full in a function call with DynaPDF.WriteFText, DynaPDF.WriteFTextEx, DynaPDF.WriteStyledText or DynaPDF.WriteStyledTextEx.
The expression can call other functions like DynaPDF.Append, DynaPDF.EndPage and DynaPDF.SetTextRect of course.
Please make sure your expression does not cause an endless loop or recursion.
You can return in your expression what should happen with next text. Return -1 to cancel write operation.
If you like to change alignment for next block, return 1 for left alignment, 2 for right alignment, 3 for center alignment or 4 for justify alignment.
You can use DynaPDF.GetLastTextPosY to know where the text of the last text block ended.
Examples
Set the page break expression:
Set Variable [ $r ; Value: MBS("DynaPDF.SetPageBreakExpression"; $pdf; "Let ( [
$CurrentColumn = $CurrentColumn + 1;
t = If ( $CurrentColumn < $ColumnCount ;
Let ( [
$PosX = $StartPosX + $CurrentColumn * ($ColumnWidth + $Distance) ];
0) ;
Let ( [
$PosX = $StartPosX;
$CurrentColumn = 0;
a = MBS( \"DynaPDF.EndPage\"; $pdf);
a = MBS( \"DynaPDF.AppendPage\"; $pdf)];
0)
);
a = MBS( \"DynaPDF.SetTextRect\"; $pdf; $PosX; $PosY; $ColumnWidth; $ColumnHeight )
]; 0 )") ]
See also
- DynaPDF.AllowPageBreak
- DynaPDF.AppendPage
- DynaPDF.EndPage
- DynaPDF.GetLastTextPosY
- DynaPDF.GetPageBreakExpression
- DynaPDF.New
- DynaPDF.WriteFText
- DynaPDF.WriteFTextEx
- DynaPDF.WriteStyledText
- DynaPDF.WriteStyledTextEx
Release notes
- Version 10.6
- Added DynaPDF.SetPageBreakExpression and DynaPDF.GetPageBreakExpression to allow custom page breaks and multi column output.
Created 15th December 2020, last changed 22nd December 2020
DynaPDF.SetPageBBox - DynaPDF.SetPageCoords
Feedback: Report problem or ask question.
Links
MBS Xojo tutorial videos