PageSetupDialog.SetPaperHeight
------------------------------

Sets paper height to use.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [PrintDialog](component_PrintDialog.md) | [11.3](newinversion113.md) | ✅ Yes | ❌ No | ❌ No | ❌ No | ❌ No |

MBS( "PageSetupDialog.SetPaperHeight"; Value ) 

**MBS**( **"PageSetupDialog.SetPaperHeight";** /\* Sets paper height to use. \*/  
**$Value**) /\* The new value.  
Unit is in 72 dpi.  
e.g. 10 cm is 10 / 2.54 \* 72 = 283 point.e.g. 400 \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Value | The new value.   Unit is in 72 dpi.   e.g. 10 cm is 10 / 2.54 \* 72 = 283 point. | 400 |

### Result

Returns OK or error.

### Description

Sets paper height to use.  
If paper width and height are both set, we pass this to the dialog for a custom paper size.  
Value is -1 if not set.  
### Examples

Create PDF with custom page size:

 Set Variable \[ $r ; Value: MBS ( "[PageSetupDialog.Enable](PageSetupDialogEnable.md)" ) \]   
Set Variable \[ $r ; Value: MBS ( "[PageSetupDialog.SetPaperWidth](PageSetupDialogSetPaperWidth.md)"; 300 ) \]   
Set Variable \[ $r ; Value: MBS ( "PageSetupDialog.SetPaperHeight"; 300 ) \]   
Set Variable \[ $r ; Value: MBS ( "[PageSetupDialog.SetNoDialog](PageSetupDialogSetNoDialog.md)"; 1 ) \]   
\# trigger the page setup dialog   
Set Variable \[ $r ; Value: MBS ( "[Schedule.EvaluateAfterDelay](ScheduleEvaluateAfterDelay.md)"; ,1; "MBS ( \\"[Menubar.RunMenuCommand](MenubarRunMenuCommand.md)\\"; 57606 )") // run Page Setup Dialog in 0.1 seconds \]   
\# wait for FileMaker to use page setup dialog   
Pause/Resume Script \[ Duration (seconds): 1 \]   
\# now save records with that page format   
Save Records as PDF \[ With dialog: Off ; “test A5.pdf” ; Records being browsed ; Create folders: Off \]   
\# and disable, so user can get the dialog again   
Set Variable \[ $r ; Value: MBS ( "[PageSetupDialog.Disable](PageSetupDialogDisable.md)" ) \]  
### See also

- [PageSetupDialog.Disable](PageSetupDialogDisable.md)
- [PageSetupDialog.Enable](PageSetupDialogEnable.md)
- [PageSetupDialog.GetPaperHeight](PageSetupDialogGetPaperHeight.md)
- [PageSetupDialog.GetPaperName](PageSetupDialogGetPaperName.md)
- [PageSetupDialog.GetPaperWidth](PageSetupDialogGetPaperWidth.md)
- [PageSetupDialog.SetNoDialog](PageSetupDialogSetNoDialog.md)
- [PageSetupDialog.SetPaperName](PageSetupDialogSetPaperName.md)
- [PageSetupDialog.SetPaperWidth](PageSetupDialogSetPaperWidth.md)
- [PrintDialog.SetPaperHeight](PrintDialogSetPaperHeight.md)
- [Schedule.EvaluateAfterDelay](ScheduleEvaluateAfterDelay.md)

### Release notes

- **Version 11.3**
    - Added [PageSetupDialog.SetPaperHeight](https://www.mbsplugins.eu/PageSetupDialogSetPaperHeight.shtml) and [PageSetupDialog.SetPaperWidth](https://www.mbsplugins.eu/PageSetupDialogSetPaperWidth.shtml) to define custom paper sizes.

### Example Databases

- [Mac only/Print/Page Setup Dialog](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20only/Print/Page%20Setup%20Dialog.shtml#2ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 11.3pr5](https://www.mbsplugins.de/archive/2021-06-28/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 27th June 2021 , last changed 27th June 2021

  
[PageSetupDialog.SetOption](PageSetupDialogSetOption.md) - [PageSetupDialog.SetPaperName](PageSetupDialogSetPaperName.md)

[HTML Version](PageSetupDialogSetPaperHeight.shtml)