PDFKit.AddEmptyPage
-------------------

Adds an empty page to the given PDF document.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [PDFKit](component_PDFKit.md) | [5.0](newinversion50.md) | ✅ Yes | ❌ No | ❌ No | ✅ Yes, on macOS | ✅ Yes |

MBS( "PDFKit.AddEmptyPage"; PDF { ; Width; Height } ) 

**MBS**( **"PDFKit.AddEmptyPage";** /\* Adds an empty page to the given PDF document. \*/  
**$PDF**; /\* A PDF reference number from [PDFKit.Open](PDFKitOpen.md).e.g. $ref \*/   
**$Width**; /\* Optional; The width for the new PDF page.e.g. 600 \*/   
**$Height**) /\* Optional; The height of the new PDF page.e.g. 800 \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | A PDF reference number from [PDFKit.Open](PDFKitOpen.md). | $ref |  |
| Width | The width for the new PDF page. | 600 | Optional |
| Height | The height of the new PDF page. | 800 | Optional |

### Result

Returns OK or error.

### Description

Adds an empty page to the given PDF document.  
  
Your changes are only done in memory, so please remember to write modified pdf back to disk, e.g. by using [PDFKit.WriteToPath](PDFKitWriteToPath.md). Or use [PDFKit.GetPDFDocument](PDFKitGetPDFDocument.md) to get a PDF for storing in a container.  
### Examples

Create PDF from images:

 # Start new document   
Set Variable \[$doc ; Value:MBS ("[PDFKit.NewPDFDocument](PDFKitNewPDFDocument.md)")\]  
\# Add image in full size as new page   
Set Variable \[$r ; Value:MBS ("[PDFKit.AddImagePage](PDFKitAddImagePage.md)"; $doc ; test::image )\]  
\# Add empty page in default size   
Set Variable \[$r ; Value:MBS ("PDFKit.AddEmptyPage"; $doc )\]  
\# Add image in given size as new page:   
Set Variable \[$r ; Value:MBS ("[PDFKit.AddImagePage](PDFKitAddImagePage.md)"; $doc ; test::image ; 400; 300)\]  
\# get PDF document and store in container:   
Set Field \[test::test ; MBS ("[PDFKit.GetPDFDocument](PDFKitGetPDFDocument.md)"; $doc )\]  
\# release memory   
Set Variable \[$r ; Value:MBS ("[PDFKit.Release](PDFKitRelease.md)"; $doc )\]  
Loop over PDF documents in records and import them into a new PDF and add empty pages between:

 Go to Record/Request/Page \[ First \]  
Set Variable \[ $pdf ; Value: MBS ( "[PDFKit.NewPDFDocument](PDFKitNewPDFDocument.md)" ) \]   
Loop  
 Set Variable \[ $r ; Value: MBS ( "[PDFKit.AppendPages](PDFKitAppendPages.md)"; $pdf ; Merge PDFs::InputPDF ) \]   
 Set Variable \[ $r ; Value: MBS ( "PDFKit.AddEmptyPage"; $pdf ; 700; 500) \]   
 Go to Record/Request/Page \[ Next ; Exit after last: On \]  
End Loop  
Set Field \[ Merge PDFs::FinalPDF ; MBS ("[PDFKit.GetPDFDocument](PDFKitGetPDFDocument.md)"; $pdf ) \]   
Set Variable \[ $r ; Value: MBS ("[PDFKit.Release](PDFKitRelease.md)"; $pdf ) \]  
### See also

- [PDFKit.AddImagePage](PDFKitAddImagePage.md)
- [PDFKit.AppendPages](PDFKitAppendPages.md)
- [PDFKit.GetPDFDocument](PDFKitGetPDFDocument.md)
- [PDFKit.NewPDFDocument](PDFKitNewPDFDocument.md)
- [PDFKit.Open](PDFKitOpen.md)
- [PDFKit.Release](PDFKitRelease.md)
- [PDFKit.WriteToPath](PDFKitWriteToPath.md)

### Blog Entries

- [MBS FileMaker Plugin, version 5.0pr12](https://www.mbsplugins.de/archive/2015-02-19/MBS_FileMaker_Plugin_version_5/monkeybreadsoftware_blog_filemaker)

### FileMaker Magazin

- [Ausgabe 1/2026, Seite 29](https://filemaker-magazin.de/neuigkeit/4312-Die-neue-Ausgabe-FMM_202601-steht-online)

This function checks for a license.

Created 16th February 2015 , last changed 28th September 2021

  
[Overlay.SetVisible](OverlaySetVisible.md) - [PDFKit.AddImageFilePage](PDFKitAddImageFilePage.md)

[HTML Version](PDFKitAddEmptyPage.shtml)