Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Switches printer or changes paper setup.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Printer | 6.5 | ❌ No | ✅ Yes | ❌ No | ❌ No | ❌ No |
Parameter | Description | Example | Flags |
---|---|---|---|
Printer | The printer name to set. Must not match exactly, just the first letters. Leave empty to not change printer. |
"Brother" | |
CloseDialog | Whether to close print dialog. Pass 1 to close or 0 to not close. Pass 2 to press cancel button in case you just want to learn the options. |
1 | Optional |
Paper Format | Available in MBS FileMaker Plugin 10.0 or newer. The name of the paper format. Leave empty to not change. |
"A4" | Optional |
Paper Orientation | Available in MBS FileMaker Plugin 10.0 or newer. The paper orientation. Pass portrait or landscape. Empty value leaves setting as is. |
"landscape" | Optional |
Paper Source | Available in MBS FileMaker Plugin 10.0 or newer. The paper source. Pass name of setting. Name doesn't need to match exactly, just first letters. So you can pass "Man" für Manual (English) and Manuell (German). |
"Man" | Optional |
Returns OK or error.
Switch printer:
Set Variable [$r; Value:MBS("Printer.SetPrinter"; Printer Dialog::Printer Name)]
Pause/Resume Script [Duration (seconds): 2]
Show Custom Dialog ["Result"; MBS("Printer.ErrorLog")]
Change paper to Letter in landscape:
MBS( "Printer.SetPrinter"; ""; 0; "Letter"; "landscape")
This function is free to use.
Created 14th November 2016, last changed 1st December 2020