PageSetupDialog.SetPaperOrientation
-----------------------------------

Sets the new paper orientation.

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

MBS( "PageSetupDialog.SetPaperOrientation"; PaperFormat ) 

**MBS**( **"PageSetupDialog.SetPaperOrientation";** /\* Sets the new paper orientation. \*/  
**$PaperFormat**) /\* The new paper orientation.  
Value should be landscape, portrait or default.e.g. "landscape" \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| PaperFormat | The new paper orientation.   Value should be landscape, portrait or default. | "landscape" |

### Result

Returns OK or error.

### Description

Sets the new paper orientation.  
You need to run paper setup dialog to let the plugin change values.  
### Examples

Set paper orientation to portrait:

 Set Variable \[ $r ; Value: MBS ("PageSetupDialog.SetPaperOrientation"; "portrait") \]  
Set paper orientation to landscape:

 Set Variable \[ $r ; Value: MBS ("PageSetupDialog.SetPaperOrientation"; "landscape") \]  
### See also

- [PageSetupDialog.GetPaperOrientation](PageSetupDialogGetPaperOrientation.md)

### Example Databases

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

### Blog Entries

- [MBS FileMaker Advent calendar - Door 23 - Printing a PDF](https://www.mbsplugins.de/archive/2024-12-23/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)
- [Page Setup Dialog example](https://www.mbsplugins.de/archive/2019-06-01/Page_Setup_Dialog_example/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 20th April 2019 , last changed 20th April 2019

  
[PageSetupDialog.SetPaperName](PageSetupDialogSetPaperName.md) - [PageSetupDialog.SetPaperWidth](PageSetupDialogSetPaperWidth.md)

[HTML Version](PageSetupDialogSetPaperOrientation.shtml)