PDFKit.SelectPrinter
--------------------

Shows the printer picker.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [PDFKit](component_PDFKit.md) | [14.2](newinversion142.md) | ❌ No | ❌ No | ❌ No | ❌ No | ✅ Yes |

MBS( "PDFKit.SelectPrinter" ) ### Parameters

none

### Result

Returns 1, 0 or error.

### Description

Shows the printer picker.  
On success, we return 1 if the user picked a printer or 0 if not.  
If a printer was selected before, we pre-select it for the next time you show the dialog.  
You can set the printer to pre-select using [PDFKit.SetPrintSetting](PDFKitSetPrintSetting.md) function.  
  
See [PDFKit.GetPrintSetting](PDFKitGetPrintSetting.md) to query printerURL to identify it.  
### Examples

Pick a printer:

 If \[ Length ( PDFKit Print::PrinterURL ) &gt; 0 \]  
 Set Variable \[ $r ; Value: MBS ( "[PDFKit.SetPrintSetting](PDFKitSetPrintSetting.md)"; "PrinterURL"; PDFKit Print::PrinterURL ) \]  
End If  
\# show the dialog   
Set Variable \[ $userDidSelect ; Value: MBS ( "PDFKit.SelectPrinter" ) \]  
If \[ MBS ("IsError") \]  
 Show Custom Dialog \[ "Failed to show printer selecto…" ; $r \]  
Else If \[ $userDidSelect \]  
 # and check what we got  
 Set Variable \[ $printerURL ; Value: MBS ( "[PDFKit.GetPrintSetting](PDFKitGetPrintSetting.md)"; "PrinterURL" ) \]  
End If  
### See also

- [IsError](IsError.md)
- [PDFKit.GetPrintSetting](PDFKitGetPrintSetting.md)
- [PDFKit.SetPrintSetting](PDFKitSetPrintSetting.md)

### Release notes

- **Version 15.2**
    - Improved [PDFKit.SelectPrinter](https://www.mbsplugins.eu/PDFKitSelectPrinter.shtml) to return an error when we fail to create the dialog.
- **Version 14.2**
    - Added functions for iOS to print including [PDFKit.SelectPrinter](https://www.mbsplugins.eu/PDFKitSelectPrinter.shtml) to pick a printer.

### Example Databases

- [Mac and iOS/PDFKit/Printing iOS](https://www.mbsplugins.eu/MBS-FileMaker-Plugin-Examples/Mac%20and%20iOS/PDFKit/Printing%20iOS.shtml#12ScriptAnchor_)

### Blog Entries

- [MBS FileMaker Plugin, version 15.2pr1](https://www.mbsplugins.de/archive/2025-04-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [News in MBS FileMaker Plugin 14.2](https://www.mbsplugins.de/archive/2024-05-21/News_in_MBS_FileMaker_Plugin_1/monkeybreadsoftware_blog_filemaker)
- [Neues MBS Plugin 14.2 für Claris FileMaker](https://www.mbsplugins.de/archive/2024-05-14/Neues_MBS_Plugin_142_für_Clar/monkeybreadsoftware_blog_filemaker)
- [MBS Plugin 14.2 for Claris FileMaker](https://www.mbsplugins.de/archive/2024-05-14/MBS_Plugin_142_for_Claris_File/monkeybreadsoftware_blog_filemaker)
- [MBS @ FMTraining.TV - Printing in FileMaker with the MonkeyBread Plug-in](https://www.mbsplugins.de/archive/2024-04-17/MBS_@_FMTrainingTV_-_Printing_/monkeybreadsoftware_blog_filemaker)
- [Controlled printing for iOS in FileMaker](https://www.mbsplugins.de/archive/2024-04-15/Controlled_printing_for_iOS_in/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 14.2pr2](https://www.mbsplugins.de/archive/2024-04-11/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 14.2pr1](https://www.mbsplugins.de/archive/2024-04-02/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 17th March 2024 , last changed 15th May 2024

  
[PDFKit.SavePrintSettings](PDFKitSavePrintSettings.md) - [PDFKit.SetCurrentFilter](PDFKitSetCurrentFilter.md)

[HTML Version](PDFKitSelectPrinter.shtml)