PrintDialog.SetDestinationPath
------------------------------

Sets the destination path for PDF.

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

MBS( "PrintDialog.SetDestinationPath"; Path ) 

**MBS**( **"PrintDialog.SetDestinationPath";** /\* Sets the destination path for PDF. \*/  
**$Path**) /\* Native file path for PDF file. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Path | Native file path for PDF file. | $path |

### Result

Returns error or OK.

### Description

Sets the destination path for PDF.  
If you want the user to select a path, please use [FileDialog](component_FileDialog.md) functions.  
  
This function requires a native path. Use [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md) to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use [FileDialog](component_FileDialog.md) functions.  
### Examples

Set print to PDF:

 Set Variable \[ $r ; Value: MBS ( "[PrintDialog.SetPrintToPDF](PrintDialogSetPrintToPDF.md)"; 1 ) \]   
Set Variable \[ $r ; Value: MBS ( "PrintDialog.SetDestinationPath"; "/Users/cs/Desktop/test.pdf" ) \]  
Install and print to PDF:

 Set Variable \[$r ; MBS ( "[PrintDialog.Install](PrintDialogInstall.md)")\]  
Set Variable \[$r ; MBS ( "[PrintDialog.Enable](PrintDialogEnable.md)")\]  
Set Variable \[$r ; MBS ( "[PrintDialog.SetPrintToPDF](PrintDialogSetPrintToPDF.md)"; 1)\]  
Set Variable \[$r ; MBS ( "PrintDialog.SetDestinationPath"; "/Users/cs/Desktop/test.pdf")\]  
Set Variable \[$r ; MBS ( "[PrintDialog.SetNoDialog](PrintDialogSetNoDialog.md)"; 1 )\]  
Print \[\]  
### See also

- [Path.FileMakerPathToNativePath](PathFileMakerPathToNativePath.md)
- [PrintDialog.Enable](PrintDialogEnable.md)
- [PrintDialog.GetDestinationPath](PrintDialogGetDestinationPath.md)
- [PrintDialog.Install](PrintDialogInstall.md)
- [PrintDialog.SetNoDialog](PrintDialogSetNoDialog.md)
- [PrintDialog.SetPrintToPDF](PrintDialogSetPrintToPDF.md)
- [PrintDialog.SetPrintType](PrintDialogSetPrintType.md)

### Release notes

- **Version 10.1**
    - Fixed bug in [PrintDialog.SetDestinationPath](https://www.mbsplugins.eu/PrintDialogSetDestinationPath.shtml) not working with space in file path.

### 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 Advent calendar - Door 23 - Printing a PDF](https://www.mbsplugins.de/archive/2024-12-23/MBS_FileMaker_Advent_calendar_/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 18th August 2014 , last changed 13th May 2020

  
[PrintDialog.SetCopies](PrintDialogSetCopies.md) - [PrintDialog.SetDuplex](PrintDialogSetDuplex.md)

[HTML Version](PrintDialogSetDestinationPath.shtml)