PrintDialog.GetLastSettings
---------------------------

Queries last settings from print dialog.

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

MBS( "PrintDialog.GetLastSettings" ) ### Parameters

none

### Result

Returns text or error.

### Description

Queries last settings from print dialog.  
Please print once with enabled print [dialog](component_Dialog.md) functions. After printing with dialog, you can query last settings and see what OS X or your driver uses.  
  
Since version 10.1 we return settings as JSON instead of XML and includes print parameter.  
### Examples

Get last settings:

 MBS ("PrintDialog.GetLastSettings")  
Query settings after using dialog:

 Set Variable \[ $r ; Value: MBS ("[PrintDialog.Install](PrintDialogInstall.md)") \]   
Set Variable \[ $r ; Value: MBS ("[PrintDialog.Enable](PrintDialogEnable.md)") \]   
Print \[ With dialog: On \]   
Set Variable \[ $r ; Value: MBS ("[PrintDialog.Disable](PrintDialogDisable.md)") \]   
Set Variable \[ $r ; Value: MBS ("PrintDialog.GetLastSettings") \]   
Set Field \[ Printer Dialog on Mac::Path ; $r \]  
### See also

- [PageSetupDialog.GetLastSettings](PageSetupDialogGetLastSettings.md)
- [PageSetupDialog.SetOption](PageSetupDialogSetOption.md)
- [PrintDialog.Disable](PrintDialogDisable.md)
- [PrintDialog.Enable](PrintDialogEnable.md)
- [PrintDialog.GetConfiguration](PrintDialogGetConfiguration.md)
- [PrintDialog.Install](PrintDialogInstall.md)
- [PrintDialog.SetOption](PrintDialogSetOption.md)
- [PrintDialog.SetTray](PrintDialogSetTray.md)

### Release notes

- **Version 14.1**
    - Changed [PageSetupDialog.GetLastSettings](https://www.mbsplugins.eu/PageSetupDialogGetLastSettings.shtml), [PrintDialog.GetLastSettings](https://www.mbsplugins.eu/PrintDialogGetLastSettings.shtml) and [PDFKit.GetPrintLastSettings](https://www.mbsplugins.eu/PDFKitGetPrintLastSettings.shtml) to log all text for trace log.
- **Version 13.2**
    - Fixed a problem in [PrintDialog.GetLastSettings](https://www.mbsplugins.eu/PrintDialogGetLastSettings.shtml) function reporting an exception about a nil value.
- **Version 13.0**
    - Fixed [PrintDialog.GetLastSettings](https://www.mbsplugins.eu/PrintDialogGetLastSettings.shtml) to not return an error if there are no print settings yet.
- **Version 10.3**
    - Fixed problem with exception in PDFKit.GetLastSettings, [PageSetupDialog.GetLastSettings](https://www.mbsplugins.eu/PageSetupDialogGetLastSettings.shtml) and [PrintDialog.GetLastSettings](https://www.mbsplugins.eu/PrintDialogGetLastSettings.shtml) functions.
- **Version 10.1**
    - Rewrote [PDFKit.GetPrintLastSettings](https://www.mbsplugins.eu/PDFKitGetPrintLastSettings.shtml), [PageSetupDialog.GetLastSettings](https://www.mbsplugins.eu/PageSetupDialogGetLastSettings.shtml) and [PrintDialog.GetLastSettings](https://www.mbsplugins.eu/PrintDialogGetLastSettings.shtml) to return result as JSON.

### Example Databases

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

### Blog Entries

- [MBS FileMaker Plugin, version 14.1pr5](https://www.mbsplugins.de/archive/2024-03-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [Control printing in FileMaker with MBS Plugin on MacOS](https://www.mbsplugins.de/archive/2023-06-11/Control_printing_in_FileMaker_/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 13.2pr3](https://www.mbsplugins.de/archive/2023-04-20/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 12.6pr3](https://www.mbsplugins.de/archive/2022-12-13/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.3pr1](https://www.mbsplugins.de/archive/2020-06-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 10.1pr5](https://www.mbsplugins.de/archive/2020-02-24/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 6.2 for OS X/Windows](https://www.mbsplugins.de/archive/2016-05-24/MBS_FileMaker_Plugin_62_for_OS/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 6.2pr7](https://www.mbsplugins.de/archive/2016-05-07/MBS_FileMaker_Plugin_version_6/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 30th April 2016 , last changed 21st February 2020

  
[PrintDialog.GetLastPage](PrintDialogGetLastPage.md) - [PrintDialog.GetNoDialog](PrintDialogGetNoDialog.md)

[HTML Version](PrintDialogGetLastSettings.shtml)