Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
DynaPDF.SetPageBreakExpression
Sets page break expression.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
DynaPDF | 11.0 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
MBS( "DynaPDF.SetPageBreakExpression"; PDF; Expression ) More
Parameters
Parameter | Description | Example |
---|---|---|
The PDF reference returned from DynaPDF.New. | ||
Expression | The expression to use. |
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.AppendPage, 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; 1)];
0)
);
a = MBS( \"DynaPDF.SetTextRect\"; $pdf; $PosX; $PosY; $ColumnWidth; $ColumnHeight )
]; 0 )") ]
See also
- DynaPDF.AllowPageBreak
- DynaPDF.AppendPage
- DynaPDF.EndPage
- DynaPDF.GetPageBreakExpression
- DynaPDF.New
- DynaPDF.SetTextRect
- DynaPDF.WriteFText
- DynaPDF.WriteFTextEx
- DynaPDF.WriteStyledText
- DynaPDF.WriteStyledTextEx
Release notes
- Version 11.0
- Added DynaPDF.SetPageBreakExpression and DynaPDF.GetPageBreakExpression to allow custom page breaks and multi column output.
Example Databases
Blog Entries
- Page Layouting in DynaPDF
- New in MBS FileMaker Plugin 11.0
- Neues MBS FileMaker Plugin 11.0
- MBS FileMaker Plugin 11.0 - More than 6400 Functions In One Plugin
- Multi Column Output for PDFs with FileMaker
- MBS FileMaker Plugin, version 10.6pr3
This function checks for a license.
Created 15th December 2020, last changed 23th February 2024