Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
9.3
9.4
9.5
10.0
10.1
10.2
10.3
10.4
10.5
10.6
Statistic
FMM
Blog
PDFKit.SetPrintSetting
Sets print settings for printing PDF.
| Component | Version | macOS | Windows | Linux | Server | FileMaker iOS SDK |
| PDFKit | 4.0 | Yes | No | No | Yes, macOS only | No |
Parameters
| Parameter | Description | Example |
|---|---|---|
| Selector | Which value to set. | "FaxNumber" |
| Value | The value for the setting. | "+123456" |
Result
Returns OK or error.
Description
Sets print settings for printing PDF.See also PDFKit.Print function.
All settings are optional and if not set will use default setting.
Possible settings:
| jobTitle | The title of the printing job. |
| faxNumber | A fax number for fax printers. This text is passed through and must match the format your driver expects. |
| PaperName | The name of the paper to use. |
| Printer | The name of the printer to use. |
| FirstPage | The number of the first page to print. |
| LastPage | The number of the last page to print. |
| Copies | The number of copies to print. Default is 1. |
| ReversePageOrder | Whether to reverse the page order. Pass 1 to reverse or 0 to not reverse. Default is not reverse. |
| MustCollate | Whether to collate or not. Pass 1 to collate or 0 to not collate. Default is 0. |
| AutoRotate | Whether to automatically rotate to match the PDF page format. Default is 1 (on). |
| ShowsPrintPanel | Whether to show the print panel. Default is 0 to not show it. Pass 1 for value to show dialog. |
| ShowsProgressPanel | Whether to show the progress panel. Default is 0 to not show it. Pass 1 for value to show progress. |
| DuplexMode | Whether to use duplex mode. Can be None (Print only on one side of sheet of paper), DuplexNoTumble (Print on both sides of the paper, with no tumbling), DuplexTumble (Print on both sides of the paper, tumbling on) or SimplexTumble (Print on only one side of the paper, but tumble the images while printing). |
| DetailedErrorReporting | Whether to enable detailed error reporting. If 1, produce detailed reports when an error occurs. |
| PagesAcross | Number of logical pages to be placed across a physical sheet. |
| PagesDown | Number of logical pages to be placed down a physical sheet. |
| TopMargin | The top margin. Default 0. |
| BottomMargin | The bottom margin. Default 0. |
| LeftMargin | The left margin. Default 0. |
| RightMargin | The right margin. Default 0. |
| HorizontalPagination | The horizontal pagination. Can be auto, clip or fit. Default is fit. |
| VerticalPagination | The vertical pagination. Can be auto, clip or fit. Default is fit. |
| scalingMode | The scaling mode to use. Default is None, but can also be DownToFit or ToFit. |
| Tray | The name of the paper tray. See PrintDialog.GetTray to find the name of the tray. (New in 8.0) |
You can use PDFKit.SetPrintOption to set custom print options like with PrintDialog.SetOption function.
Examples
Set a fax number:
MBS( "PDFKit.SetPrintSetting"; "FaxNumber"; "+123456" )
Print page 2 to 10 and make 3 copies:
MBS( "PDFKit.ResetPrintSettings" )
MBS( "PDFKit.SetPrintSetting"; "FirstPage"; 2 )
MBS( "PDFKit.SetPrintSetting"; "LastPage"; 10 )
MBS( "PDFKit.SetPrintSetting"; "Copies"; 3 )
MBS( "PDFKit.Print" )
Set a duplex:
MBS( "PDFKit.SetPrintSetting"; "DuplexMode"; "DuplexNoTumble" )
Horizontal and vertical fit:
$r = MBS( "PDFKit.SetPrintSetting"; "HorizontalPagination"; "fit" )
$r = MBS( "PDFKit.SetPrintSetting"; "VerticalPagination"; "fit" )
Set paper tray:
MBS("PDFKit.SetPrintSetting"; "Tray"; "Tray-2")
Enable print dialog:
MBS( "PDFKit.SetPrintSetting"; "ShowsPrintPanel"; 1 )
Enable progress dialog:
MBS( "PDFKit.SetPrintSetting"; "ShowsProgressPanel"; 1 )
See also
- PDFKit.GetPrintLastSettings
- PDFKit.GetPrintOption
- PDFKit.GetPrintSetting
- PDFKit.Print
- PDFKit.ResetPrintSettings
- PDFKit.RestorePrintSettings
- PDFKit.SavePrintSettings
- PDFKit.SetPrintOption
- PrintDialog.GetTray
- PrintDialog.SetOption
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 10.1pr5
- MBS FileMaker Plugin, version 8.0pr8
- MBS Filemaker Plugin, version 4.0pr5
FileMaker Magazin
Release notes
- Version 10.1
- Fixed tray setting for PDFKit.SetPrintSetting function.
- Version 8.0
- Added Tray setting for PDFKit.SetPrintSetting.
Created 18th August 2014, last changed 28th November 2019
PDFKit.SetPrintOption - PDFKit.Watermark
Feedback: Report problem or ask question.
Links
MBS FileMaker Plugins