DynaPDF.SetPrintSettings
------------------------

Adds preferred print settings to the PDF file.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [5.1](newinversion51.md) | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |

MBS( "DynaPDF.SetPrintSettings"; PDF { ; DuplexMode; PickTrayByPDFSize; NumCopies; PrintScaling; PrintRanges } ) 

**MBS**( **"DynaPDF.SetPrintSettings";** /\* Adds preferred print settings to the PDF file. \*/  
**$PDF**; /\* The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). \*/   
**$DuplexMode**; /\* Optional; The duplex mode. Can be FlipShortEdge, FlipLongEdge, Simplex or None.e.g. "FlipLongEdge" \*/   
**$PickTrayByPDFSize**; /\* Optional; Whether to pick tray by PDF size. Can be 1 = true, 0 = false or -1 = app default.e.g. 1 \*/   
**$NumCopies**; /\* Optional; The number of copies between 1 and 5. 0 is app default.e.g. 2 \*/   
**$PrintScaling**; /\* Optional; Can be None or AppDefault currently.e.g. "None" \*/   
**$PrintRanges**) /\* Optional; Defines the print ranges.  
For this pass one parameter for start number and one for end number with as many parameters as you want to pass arguments. \*/ 

### Parameters

| Parameter | Description | Example | Flags |
|---|---|---|---|
| PDF | The PDF reference returned from [DynaPDF.New](DynaPDFNew.md). | $pdf |  |
| DuplexMode | The duplex mode. Can be FlipShortEdge, FlipLongEdge, Simplex or None. | "FlipLongEdge" | Optional |
| PickTrayByPDFSize | Whether to pick tray by PDF size. Can be 1 = true, 0 = false or -1 = app default. | 1 | Optional |
| NumCopies | The number of copies between 1 and 5. 0 is app default. | 2 | Optional |
| PrintScaling | Can be None or AppDefault currently. | "None" | Optional |
| PrintRanges | Defines the print ranges.   For this pass one parameter for start number and one for end number with as many parameters as you want to pass arguments. |  | Optional |

### Result

Returns OK or error.

### Description

Adds preferred print settings to the PDF file.   
Viewer applications use the print settings to initialize the print dialog. Print ranges, if set, consist of two numbers which define the start and end page number that should be printed.   
See also [DynaPDF.GetPrintSettings](DynaPDFGetPrintSettings.md) and [DynaPDF.GetInPrintSettings](DynaPDFGetInPrintSettings.md).  
  
This settings are for Adobe Reader, not for printing the PDF in FileMaker!  
See also [SetPrintSettings](https://www.monkeybreadsoftware.com/DynaPDF-Manual/SetPrintSettings.shtml) function in DynaPDF manual.

### Examples

Set to print duplex and from page 3 to 8 and 12 to 15.

 MBS ( "DynaPDF.SetPrinterSettings"; $PDF ; "FlipLongEdge  
"; -1; 1; "None"; 3; 8; 12; 15 )  
### See also

- [DynaPDF.GetInPrintSettings](DynaPDFGetInPrintSettings.md)
- [DynaPDF.GetPrintSettings](DynaPDFGetPrintSettings.md)
- [DynaPDF.New](DynaPDFNew.md)

### Blog Entries

- [MBS FileMaker Plugin 5.1 for OS X/Windows](https://www.mbsplugins.de/archive/2015-05-19/MBS_FileMaker_Plugin_51_for_OS/monkeybreadsoftware_blog_filemaker)

This function checks for a license.

Created 14th March 2015 , last changed 14th July 2022

  
[DynaPDF.SetPageWidth](DynaPDFSetPageWidth.md) - [DynaPDF.SetRenderingIntent](DynaPDFSetRenderingIntent.md)

[HTML Version](DynaPDFSetPrintSettings.shtml)