DynaPDF.Print.SetSetting
------------------------

Sets a print setting.

| Component | Version | macOS | Windows | Linux | Server | iOS SDK |
|---|---|---|---|---|---|---|
| [DynaPDF](component_DynaPDF.md) | [11.4](newinversion114.md) | ❌ No | ✅ Yes | ❌ No | ✅ Yes, on Windows | ❌ No |

MBS( "DynaPDF.Print.SetSetting"; Selector; Value ) 

**MBS**( **"DynaPDF.Print.SetSetting";** /\* Sets a print setting. \*/  
**$Selector**; /\* What propert to set.  
This includes PrinterName, Orientation, PaperSize, PaperLength, PaperWidth, Scale, Copies, DefaultSource, PrintQuality, Color, Duplex, YResolution, TTOption, Collate, FormName, MediaType, and DitherType.e.g. "PrinterName" \*/   
**$Value**) /\* The value to set.  
Can be empty for most values to clear it. \*/ 

### Parameters

| Parameter | Description | Example |
|---|---|---|
| Selector | What propert to set.   This includes PrinterName, Orientation, PaperSize, PaperLength, PaperWidth, Scale, Copies, DefaultSource, PrintQuality, Color, Duplex, YResolution, TTOption, Collate, FormName, MediaType, and DitherType. | "PrinterName" |
| Value | The value to set.   Can be empty for most values to clear it. |  |

### Result

Returns OK or error.

### Description

Sets a print setting.  
Value can be empty (or -1) to clear value.  
  
PrinterName: A text that specifies the "friendly" name of the printer or display; for example, "PCL/HP LaserJet" in the case of PCL/HP LaserJet. This string is unique among device drivers. Note that this name may be truncated to fit in the field. Can be overwritten via parameter to [DynaPDF.Print](DynaPDFPrint.md)!  
  
Orientation: Value 1 is portrait and 2 is landscape.  
  
PaperSize: Selects the size of the paper to print on. This member can be set to zero if the length and width of the paper are both set by the PaperLength and PaperWidth members. Otherwise, the PaperSize member can be set to a device specific value greater than or equal to DMPAPER\_USER or to one of the following predefined values.  
  
| Value | Numeric | Meaning |
|---|---|---|
| DMPAPER\_LETTER | 1 | Letter 8 1/2 x 11 in |
| DMPAPER\_LETTERSMALL | 2 | Letter Small 8 1/2 x 11 in |
| DMPAPER\_TABLOID | 3 | Tabloid 11 x 17 in |
| DMPAPER\_LEDGER | 4 | Ledger 17 x 11 in |
| DMPAPER\_LEGAL | 5 | Legal 8 1/2 x 14 in |
| DMPAPER\_STATEMENT | 6 | Statement 5 1/2 x 8 1/2 in |
| DMPAPER\_EXECUTIVE | 7 | Executive 7 1/4 x 10 1/2 in |
| DMPAPER\_A3 | 8 | A3 297 x 420 mm |
| DMPAPER\_A4 | 9 | A4 210 x 297 mm |
| DMPAPER\_A4SMALL | 10 | A4 Small 210 x 297 mm |
| DMPAPER\_A5 | 11 | A5 148 x 210 mm |
| DMPAPER\_B4 | 12 | B4 (JIS) 250 x 354 |
| DMPAPER\_B5 | 13 | B5 (JIS) 182 x 257 mm |
| DMPAPER\_FOLIO | 14 | Folio 8 1/2 x 13 in |
| DMPAPER\_QUARTO | 15 | Quarto 215 x 275 mm |
| DMPAPER\_10X14 | 16 | 10x14 in |
| DMPAPER\_11X17 | 17 | 11x17 in |
| DMPAPER\_NOTE | 18 | Note 8 1/2 x 11 in |
| DMPAPER\_ENV\_9 | 19 | Envelope #9 3 7/8 x 8 7/8 |
| DMPAPER\_ENV\_10 | 20 | Envelope #10 4 1/8 x 9 1/2 |
| DMPAPER\_ENV\_11 | 21 | Envelope #11 4 1/2 x 10 3/8 |
| DMPAPER\_ENV\_12 | 22 | Envelope #12 4 \\276 x 11 |
| DMPAPER\_ENV\_14 | 23 | Envelope #14 5 x 11 1/2 |
| DMPAPER\_CSHEET | 24 | C size sheet |
| DMPAPER\_DSHEET | 25 | D size sheet |
| DMPAPER\_ESHEET | 26 | E size sheet |
| DMPAPER\_ENV\_DL | 27 | Envelope DL 110 x 220mm |
| DMPAPER\_ENV\_C5 | 28 | Envelope C5 162 x 229 mm |
| DMPAPER\_ENV\_C3 | 29 | Envelope C3 324 x 458 mm |
| DMPAPER\_ENV\_C4 | 30 | Envelope C4 229 x 324 mm |
| DMPAPER\_ENV\_C6 | 31 | Envelope C6 114 x 162 mm |
| DMPAPER\_ENV\_C65 | 32 | Envelope C65 114 x 229 mm |
| DMPAPER\_ENV\_B4 | 33 | Envelope B4 250 x 353 mm |
| DMPAPER\_ENV\_B5 | 34 | Envelope B5 176 x 250 mm |
| DMPAPER\_ENV\_B6 | 35 | Envelope B6 176 x 125 mm |
| DMPAPER\_ENV\_ITALY | 36 | Envelope 110 x 230 mm |
| DMPAPER\_ENV\_MONARCH | 37 | Envelope Monarch 3.875 x 7.5 in |
| DMPAPER\_ENV\_PERSONAL | 38 | 6 3/4 Envelope 3 5/8 x 6 1/2 in |
| DMPAPER\_FANFOLD\_US | 39 | US Std Fanfold 14 7/8 x 11 in |
| DMPAPER\_FANFOLD\_STD\_GERMAN | 40 | German Std Fanfold 8 1/2 x 12 in |
| DMPAPER\_FANFOLD\_LGL\_GERMAN | 41 | German Legal Fanfold 8 1/2 x 13 in |
| DMPAPER\_ISO\_B4 | 42 | B4 (ISO) 250 x 353 mm |
| DMPAPER\_JAPANESE\_POSTCARD | 43 | Japanese Postcard 100 x 148 mm |
| DMPAPER\_9X11 | 44 | 9 x 11 in |
| DMPAPER\_10X11 | 45 | 10 x 11 in |
| DMPAPER\_15X11 | 46 | 15 x 11 in |
| DMPAPER\_ENV\_INVITE | 47 | Envelope Invite 220 x 220 mm |
| DMPAPER\_RESERVED\_48 | 48 | RESERVED--DO NOT USE |
| DMPAPER\_RESERVED\_49 | 49 | RESERVED--DO NOT USE |
| DMPAPER\_LETTER\_EXTRA | 50 | Letter Extra 9 \\275 x 12 in |
| DMPAPER\_LEGAL\_EXTRA | 51 | Legal Extra 9 \\275 x 15 in |
| DMPAPER\_TABLOID\_EXTRA | 52 | Tabloid Extra 11.69 x 18 in |
| DMPAPER\_A4\_EXTRA | 53 | A4 Extra 9.27 x 12.69 in |
| DMPAPER\_LETTER\_TRANSVERSE | 54 | Letter Transverse 8 \\275 x 11 in |
| DMPAPER\_A4\_TRANSVERSE | 55 | A4 Transverse 210 x 297 mm |
| DMPAPER\_LETTER\_EXTRA\_TRANSVERSE | 56 | Letter Extra Transverse 9\\275 x 12 in |
| DMPAPER\_A\_PLUS | 57 | SuperA/SuperA/A4 227 x 356 mm |
| DMPAPER\_B\_PLUS | 58 | SuperB/SuperB/A3 305 x 487 mm |
| DMPAPER\_LETTER\_PLUS | 59 | Letter Plus 8.5 x 12.69 in |
| DMPAPER\_A4\_PLUS | 60 | A4 Plus 210 x 330 mm |
| DMPAPER\_A5\_TRANSVERSE | 61 | A5 Transverse 148 x 210 mm |
| DMPAPER\_B5\_TRANSVERSE | 62 | B5 (JIS) Transverse 182 x 257 mm |
| DMPAPER\_A3\_EXTRA | 63 | A3 Extra 322 x 445 mm |
| DMPAPER\_A5\_EXTRA | 64 | A5 Extra 174 x 235 mm |
| DMPAPER\_B5\_EXTRA | 65 | B5 (ISO) Extra 201 x 276 mm |
| DMPAPER\_A2 | 66 | A2 420 x 594 mm |
| DMPAPER\_A3\_TRANSVERSE | 67 | A3 Transverse 297 x 420 mm |
| DMPAPER\_A3\_EXTRA\_TRANSVERSE | 68 | A3 Extra Transverse 322 x 445 mm |
| DMPAPER\_DBL\_JAPANESE\_POSTCARD | 69 | Japanese Double Postcard 200 x 148 mm |
| DMPAPER\_A6 | 70 | A6 105 x 148 mm |
| DMPAPER\_JENV\_KAKU2 | 71 | Japanese Envelope Kaku #2 |
| DMPAPER\_JENV\_KAKU3 | 72 | Japanese Envelope Kaku #3 |
| DMPAPER\_JENV\_CHOU3 | 73 | Japanese Envelope Chou #3 |
| DMPAPER\_JENV\_CHOU4 | 74 | Japanese Envelope Chou #4 |
| DMPAPER\_LETTER\_ROTATED | 75 | Letter Rotated 11 x 8 1/2 11 in |
| DMPAPER\_A3\_ROTATED | 76 | A3 Rotated 420 x 297 mm |
| DMPAPER\_A4\_ROTATED | 77 | A4 Rotated 297 x 210 mm |
| DMPAPER\_A5\_ROTATED | 78 | A5 Rotated 210 x 148 mm |
| DMPAPER\_B4\_JIS\_ROTATED | 79 | B4 (JIS) Rotated 364 x 257 mm |
| DMPAPER\_B5\_JIS\_ROTATED | 80 | B5 (JIS) Rotated 257 x 182 mm |
| DMPAPER\_JAPANESE\_POSTCARD\_ROTATED | 81 | Japanese Postcard Rotated 148 x 100 mm |
| DMPAPER\_DBL\_JAPANESE\_POSTCARD\_ROTATED | 82 | Double Japanese Postcard Rotated 148 x 200 mm |
| DMPAPER\_A6\_ROTATED | 83 | A6 Rotated 148 x 105 mm |
| DMPAPER\_JENV\_KAKU2\_ROTATED | 84 | Japanese Envelope Kaku #2 Rotated |
| DMPAPER\_JENV\_KAKU3\_ROTATED | 85 | Japanese Envelope Kaku #3 Rotated |
| DMPAPER\_JENV\_CHOU3\_ROTATED | 86 | Japanese Envelope Chou #3 Rotated |
| DMPAPER\_JENV\_CHOU4\_ROTATED | 87 | Japanese Envelope Chou #4 Rotated |
| DMPAPER\_B6\_JIS | 88 | B6 (JIS) 128 x 182 mm |
| DMPAPER\_B6\_JIS\_ROTATED | 89 | B6 (JIS) Rotated 182 x 128 mm |
| DMPAPER\_12X11 | 90 | 12 x 11 in |
| DMPAPER\_JENV\_YOU4 | 91 | Japanese Envelope You #4 |
| DMPAPER\_JENV\_YOU4\_ROTATED | 92 | Japanese Envelope You #4 Rotated\*/ |
| DMPAPER\_P16K | 93 | PRC 16K 146 x 215 mm |
| DMPAPER\_P32K | 94 | PRC 32K 97 x 151 mm |
| DMPAPER\_P32KBIG | 95 | PRC 32K(Big) 97 x 151 mm |
| DMPAPER\_PENV\_1 | 96 | PRC Envelope #1 102 x 165 mm |
| DMPAPER\_PENV\_2 | 97 | PRC Envelope #2 102 x 176 mm |
| DMPAPER\_PENV\_3 | 98 | PRC Envelope #3 125 x 176 mm |
| DMPAPER\_PENV\_4 | 99 | PRC Envelope #4 110 x 208 mm |
| DMPAPER\_PENV\_5 | 100 | PRC Envelope #5 110 x 220 mm |
| DMPAPER\_PENV\_6 | 101 | PRC Envelope #6 120 x 230 mm |
| DMPAPER\_PENV\_7 | 102 | PRC Envelope #7 160 x 230 mm |
| DMPAPER\_PENV\_8 | 103 | PRC Envelope #8 120 x 309 mm |
| DMPAPER\_PENV\_9 | 104 | PRC Envelope #9 229 x 324 mm |
| DMPAPER\_PENV\_10 | 105 | PRC Envelope #10 324 x 458 mm |
| DMPAPER\_P16K\_ROTATED | 106 | PRC 16K Rotated |
| DMPAPER\_P32K\_ROTATED | 107 | PRC 32K Rotated |
| DMPAPER\_P32KBIG\_ROTATED | 108 | PRC 32K(Big) Rotated |
| DMPAPER\_PENV\_1\_ROTATED | 109 | PRC Envelope #1 Rotated 165 x 102 mm |
| DMPAPER\_PENV\_2\_ROTATED | 110 | PRC Envelope #2 Rotated 176 x 102 mm |
| DMPAPER\_PENV\_3\_ROTATED | 111 | PRC Envelope #3 Rotated 176 x 125 mm |
| DMPAPER\_PENV\_4\_ROTATED | 112 | PRC Envelope #4 Rotated 208 x 110 mm |
| DMPAPER\_PENV\_5\_ROTATED | 113 | PRC Envelope #5 Rotated 220 x 110 mm |
| DMPAPER\_PENV\_6\_ROTATED | 114 | PRC Envelope #6 Rotated 230 x 120 mm |
| DMPAPER\_PENV\_7\_ROTATED | 115 | PRC Envelope #7 Rotated 230 x 160 mm |
| DMPAPER\_PENV\_8\_ROTATED | 116 | PRC Envelope #8 Rotated 309 x 120 mm |
| DMPAPER\_PENV\_9\_ROTATED | 117 | PRC Envelope #9 Rotated 324 x 229 mm |
| DMPAPER\_PENV\_10\_ROTATED | 118 | PRC Envelope #10 Rotated 458 x 324 mm |
| DMPAPER\_USER | 256 | User defined size. |

  
PaperLength: overrides the length of the paper specified by the PaperSize member, either for custom paper sizes or for devices such as dot-matrix printers that can print on a page of arbitrary length. These values, along with all other values that specify a physical length, are in tenths of a millimeter.  
  
PaperWidth: overrides the width of the paper specified by the PaperSize member.  
  
Scale: Specifies the factor by which the printed output is to be scaled. The apparent page size is scaled from the physical page size by the given factor. For example, a letter-sized page with a Scale value of 0.50 would contain as much data as a page of 17- by 22-inches because the output text and graphics would be half their original height and width.  
  
Copies: Selects the number of copies printed if the device supports multiple-page copies.  
  
DefaultSource: Specifies the paper source.  
  
| Name | Numeric | Description |
|---|---|---|
| DMBIN\_UPPER | 1 | Select the upper paper bin. This value is also used for the paper source for printers that only have one paper bin. |
| DMBIN\_LOWER | 2 | Select the lower bin. |
| DMBIN\_MIDDLE | 3 | Select the middle paper bin. |
| DMBIN\_MANUAL | 4 | Manually select the paper bin. |
| DMBIN\_ENVELOPE | 5 | Select the auto envelope bin. |
| DMBIN\_ENVMANUAL | 6 | Select the manual envelope bin. |
| DMBIN\_AUTO | 7 | Auto-select the bin. |
| DMBIN\_TRACTOR | 8 | Select the bin with the tractor paper. |
| DMBIN\_SMALLFMT | 9 | Select the bin with the smaller paper format. |
| DMBIN\_LARGEFMT | 10 | Select the bin with the larger paper format. |
| DMBIN\_LARGECAPACITY | 11 | Select the bin with large capacity. |
| DMBIN\_CASSETTE | 14 | Select the cassette bin. |
| DMBIN\_FORMSOURCE | 15 | Select the bin with the required form. |

  
PrintQuality: Specifies the printer resolution. The number of dots per inch (DPI) and is therefore device dependent.  
  
Color: Switches between color and monochrome on color printers. The following are the possible values:  
  
| Value | Numeric | Meaning |
|---|---|---|
| DMCOLOR\_COLOR | 2 | Black &amp; White only |
| DMCOLOR\_MONOCHROME | 1 | With Color |

  
Duplex: Selects duplex or double-sided printing for printers capable of duplex printing. Following are the possible values.  
  
| Value | Numeric | Meaning |
|---|---|---|
| DMDUP\_SIMPLEX | 1 | Normal (nonduplex) printing. |
| DMDUP\_HORIZONTAL | 3 | Short-edge binding, that is, the long edge of the page is horizontal. |
| DMDUP\_VERTICAL | 2 | Long-edge binding, that is, the long edge of the page is vertical. |

  
YResolution: Specifies the y-resolution, in dots per inch, of the printer. If the printer initializes this member, the PrintQuality member specifies the x-resolution, in dots per inch, of the printer.  
  
TTOption: Specifies how TrueType fonts should be printed. This member can be one of the following values.  
  
| Value | Numeric | Meaning |
|---|---|---|
| DMTT\_BITMAP | 1 | Prints TrueType fonts as graphics. This is the default action for dot-matrix printers. |
| DMTT\_DOWNLOAD | 2 | Downloads TrueType fonts as soft fonts. This is the default action for Hewlett-Packard printers that use Printer Control Language (PCL). |
| DMTT\_DOWNLOAD\_OUTLINE | 4 | Downloads TrueType fonts as outline soft fonts. |
| DMTT\_SUBDEV | 3 | Substitutes device fonts for TrueType fonts. This is the default action for PostScript printers. |

  
Collate: Specifies whether collation should be used when printing multiple copies. (This member is ignored unless the printer driver indicates support for collation by setting the Fields member to include collate.) This member can be one of the following values.  
  
| Value | Numeric | Meaning |
|---|---|---|
| DMCOLLATE\_TRUE | 1 | Collate when printing multiple copies. |
| DMCOLLATE\_FALSE | 0 | Do not collate when printing multiple copies. |

  
FormName: A text that specifies the name of the form to use; for example, "Letter" or "Legal".  
  
MediaType: Specifies the type of media being printed on. The member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMMEDIA\_USER.  
  
| Value | Numeric | Meaning |
|---|---|---|
| DMMEDIA\_STANDARD | 1 | Plain paper. |
| DMMEDIA\_TRANSPARENCY | 2 | Transparent film. |
| DMMEDIA\_GLOSSY | 3 | Glossy paper. |
| DMMEDIA\_USER | 256 | Device-specific media start here. |

  
DitherType: Specifies how dithering is to be done. The member can be one of the following predefined values, or a driver-defined value greater than or equal to the value of DMDITHER\_USER.  
  
| Value | Numeric | Meaning |
|---|---|---|
| DMDITHER\_NONE | 1 | No dithering. |
| DMDITHER\_COARSE | 2 | Dithering with a coarse brush. |
| DMDITHER\_FINE | 3 | Dithering with a fine brush. |
| DMDITHER\_LINEART | 4 | Line art dithering, a special dithering method that produces well defined borders between black, white, and gray scaling. It is not suitable for images that include continuous graduations in intensity and hue, such as scanned photographs. |
| DMDITHER\_GRAYSCALE | 10 | Device does gray scaling. |
| DMDITHER\_USER | 256 | Device-specific dithers start here. |

  
You can query values with [DynaPDF.Print.GetSetting](DynaPDFPrintGetSetting.md) function.  
See also [Print](https://www.monkeybreadsoftware.com/DynaPDF-Manual/PrintPDFFile.shtml) function in DynaPDF manual.

### Examples

Sets paper size to DIN A4:

 MBS ( "DynaPDF.Print.SetSetting"; "PaperSize"; 9 // A4 210 x 297 mm )  
Sets paper size to US Letter:

 MBS ( "DynaPDF.Print.SetSetting"; "PaperSize"; 1 // US Letter 8 1/2 x 11 in )  
Set printer paper size and orientation:

 Set Variable \[ $r ; Value: MBS ( "DynaPDF.Print.SetSetting"; "PaperSize"; 9) // A4 210 x 297 mm \]   
Set Variable \[ $r ; Value: MBS ( "DynaPDF.Print.SetSetting"; "Orientation"; 1) \]   
Set Variable \[ $r ; Value: MBS ( "DynaPDF.Print.SetSetting"; "PrinterName"; "Microsoft Print to PDF") \]   
Set Variable \[ $Flags ; Value: 16 \]   
Set Variable \[ $ShowDialog ; Value: 16 \]   
Set Variable \[ $r ; Value: MBS ("[DynaPDF.Print](DynaPDFPrint.md)"; $pdf ; ""; ""; ""; $Flags ; ""; ""; ""; ""; $ShowDialog ) \]  
Set to print in Black &amp; White:

 Set Variable \[ $r ; Value: MBS ("DynaPDF.Print.SetSetting"; "Color"; 2) // Black &amp; White \]  
Set to print in Color:

 Set Variable \[ $r ; Value: MBS ("DynaPDF.Print.SetSetting"; "Color"; 1) // Color \]  
### See also

- [DynaPDF.Print](DynaPDFPrint.md)
- [DynaPDF.Print.FormNames](DynaPDFPrintFormNames.md)
- [DynaPDF.Print.GetDevMode](DynaPDFPrintGetDevMode.md)
- [DynaPDF.Print.GetSetting](DynaPDFPrintGetSetting.md)
- [DynaPDF.Print.SetDevMode](DynaPDFPrintSetDevMode.md)
- [DynaPDF.Print.SetDevNames](DynaPDFPrintSetDevNames.md)

### Release notes

- **Version 11.5**
    - Improved [DynaPDF.Print.SetSetting](https://www.mbsplugins.eu/DynaPDFPrintSetSetting.shtml) to make it work better.
- **Version 11.4**
    - Added [DynaPDF.Print.GetSetting](https://www.mbsplugins.eu/DynaPDFPrintGetSetting.shtml) and [DynaPDF.Print.SetSetting](https://www.mbsplugins.eu/DynaPDFPrintSetSetting.shtml) functions.

### Blog Entries

- [New in version 11.5 of MBS FileMaker Plugin](https://www.mbsplugins.de/archive/2021-11-30/New_in_version_115_of_MBS_File/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.5pr1](https://www.mbsplugins.de/archive/2021-10-01/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)
- [New in MBS FileMaker Plugin 11.4](https://www.mbsplugins.de/archive/2021-09-15/New_in_MBS_FileMaker_Plugin_11/monkeybreadsoftware_blog_filemaker)
- [Neues MBS FileMaker Plugin 11.4](https://www.mbsplugins.de/archive/2021-09-07/Neues_MBS_FileMaker_Plugin_114/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin 11.4 - More than 6500 Functions In One Plugin](https://www.mbsplugins.de/archive/2021-09-07/MBS_FileMaker_Plugin_114_-_Mor/monkeybreadsoftware_blog_filemaker)
- [MBS FileMaker Plugin, version 11.4pr2](https://www.mbsplugins.de/archive/2021-08-11/MBS_FileMaker_Plugin_version_1/monkeybreadsoftware_blog_filemaker)

This function is free to use.

Created 9th August 2021 , last changed 5th September 2025

  
[DynaPDF.Print.SetDevNames](DynaPDFPrintSetDevNames.md) - [DynaPDF.RGB](DynaPDFRGB.md)

[HTML Version](DynaPDFPrintSetSetting.shtml)