Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

PageSetupDialog.SetPaperHeight

Sets paper height to use.

Component Version macOS Windows Linux Server iOS SDK
PrintDialog 11.3 ✅ Yes ❌ No ❌ No ❌ No ❌ No
MBS( "PageSetupDialog.SetPaperHeight"; Value )   More

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" ) ]
Set Variable [ $r ; Value: MBS( "PageSetupDialog.SetPaperWidth"; 300 ) ]
Set Variable [ $r ; Value: MBS( "PageSetupDialog.SetPaperHeight"; 300 ) ]
Set Variable [ $r ; Value: MBS( "PageSetupDialog.SetNoDialog"; 1 ) ]
# trigger the page setup dialog
Set Variable [ $r ; Value: MBS( "Schedule.EvaluateAfterDelay"; ,1; "MBS( \"Menubar.RunMenuCommand\"; 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" ) ]

See also

Release notes

Example Databases

Blog Entries

This function is free to use.

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


PageSetupDialog.SetOption - PageSetupDialog.SetPaperName