DynaPDF.AllowPageBreak
----------------------

Defines how to handle page breaks.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [4.2](newinversion42.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.AllowPageBreak"; PDF; Allow { ; PosX; PosY; Width; Height } ) 

**MBS**( **"DynaPDF.AllowPageBreak";** /\* Defines how to handle page breaks. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$Allow**; /\* Whether to allow page breaks.   
Can be 1 to allow or 0 to disallow.e.g. 0 \*/   
**$PosX**; /\* Optional; The X position of new text rectangle on the new page.e.g. 100 \*/   
**$PosY**; /\* Optional; The Y position of new text rectangle on the new page.e.g. 100 \*/   
**$Width**; /\* Optional; The width of new text rectangle on the new page.e.g. 400 \*/   
**$Height**) /\* Optional; The height of new text rectangle on the new page.e.g. 600 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| Allow | Whether to allow page breaks.    Can be 1 to allow or 0 to disallow. | 0 |  |
| PosX | The X position of new text rectangle on the new page. | 100 | Optional |
| PosY | The Y position of new text rectangle on the new page. | 100 | Optional |
| Width | The width of new text rectangle on the new page. | 400 | Optional |
| Height | The height of new text rectangle on the new page. | 600 | Optional |

### Result

Returns OK or error.

### Description

Defines how to handle page breaks.  
By default [DynaPDF.WriteFText](DynaPDFWriteFText.md) and [DynaPDF.WriteFTextEx](DynaPDFWriteFTextEx.md) functions stop when text rectangle is filled.   
If you allow a page break, the plugin will start a new page and add text there.  
If you pass all 6 parameters, we use the new rectangle for the following pages.  
  
Deprecated. Please use [DynaPDF.SetPageBreakExpression](DynaPDFSetPageBreakExpression.md) instead for future development.  
See also [AllowPageBreak](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetOnPageBreakProc.shtml) function in DynaPDF manual.

### Examples

Disable page break:

 MBS ("DynaPDF.AllowPageBreak"; $pdf ; 0)  
### See also

- [DynaPDF.New](DynaPDFNew.md)
- [DynaPDF.SetPageBreakExpression](DynaPDFSetPageBreakExpression.md)
- [DynaPDF.WriteFText](DynaPDFWriteFText.md)
- [DynaPDF.WriteFTextEx](DynaPDFWriteFTextEx.md)
- [DynaPDF.WriteStyledText](DynaPDFWriteStyledText.md)
- [DynaPDF.WriteStyledTextEx](DynaPDFWriteStyledTextEx.md)

### Example Databases

- [DynaPDF/Book Creation](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Book%20Creation.shtml#3ScriptAnchor_)
- [DynaPDF/Page Layouting](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/Page%20Layouting.shtml#2ScriptAnchor_)
- [DynaPDF/WriteFText](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/DynaPDF/WriteFText.shtml#2ScriptAnchor_)

### Blog Entries

- [Use complex text rendering with DynaPDF in FileMaker](https://www.mbsplugins.de/archive/2025-06-25/Use_complex_text_rendering_wit/monkeybreadsoftware_blog_filemaker)
- [Page Layouting in DynaPDF](https://www.mbsplugins.de/archive/2024-04-05/Page_Layouting_in_DynaPDF/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 17th July 2022

  
[DynaPDF.AddValToChoiceField](DynaPDFAddValToChoiceField.md) - [DynaPDF.AppendImagePage](DynaPDFAppendImagePage.md)

[HTML Version](DynaPDFAllowPageBreak.shtml)