Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
WebView.SetPrintParameter
Sets print parameters for WebView.Print method.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
WebView | 2.1 | ✅ Yes | ✅ Yes | ❌ No | ❌ No | ✅ Yes |
Parameters
Parameter | Description | Example |
---|---|---|
ParameterName | The name of the parameter. For MacOS, can be horizontallyCentered, verticallyCentered, showPrintPanel, orientation, printer, bottomMargin, topMargin, leftMargin or rightMargin. |
orientation |
ParameterValue | The value for the given parameter: A boolean value for horizontallyCentered, verticallyCentered and showPrintPanel. "portrait" or "landscape" for orientation. The printer name for printer. A number for bottomMargin, topMargin, leftMargin or rightMargin. | portrait |
Result
Returns OK or an error message.
Description
Sets print parameters for WebView.Print method.If showPrintPanel (Default 1) if set to 0, then no print window is shown. verticallyCentered and horizontallyCentered define if content is centered. If printer name is not valid, it will be ignored.
Parameters for iOS: jobName and orientation.
Parameters for Windows with Edge: orientation, shouldPrintBackgrounds, paperWidth, paperHeight, bottomMargin, topMargin, leftMargin and rightMargin.
Parameters for macOS with WebKit 2: horizontallyCentered, verticallyCentered, showPrintPanel, orientation, papername, printer, paperWidth, paperHeight, bottomMargin, topMargin, leftMargin, rightMargin, shouldPrintBackgrounds and MinimumFontSize.
Use WebView.GetPrintParameter to query values.
Examples
Sets bottom margin to 5 points:
Set Variable [$r; Value: MBS("WebView.SetPrintParameter"; "bottomMargin"; 5) ]
Use square paper size:
Set Variable [$r; Value:MBS("WebView.SetPrintParameter"; "paperWidth"; 800)]
Set Variable [$r; Value:MBS("WebView.SetPrintParameter"; "paperHeight"; 800)]
Use A4 paper:
Set Variable [$r; Value: MBS("WebView.SetPrintParameter"; "paperName"; "iso-a4") ]
Set landscape:
Set Variable [$r; Value: MBS("WebView.SetPrintParameter"; "orientation"; "landscape") ]
The paper size to match A4:
Set Variable [$r; Value: MBS("WebView.SetPrintParameter"; "paperWidth"; 576) ]
Set Variable [$r; Value: MBS("WebView.SetPrintParameter"; "paperHeight"; 842) ]
See also
Release notes
- Version 14.1
- Added support for orientation in WebView.SetPrintParameter function for iOS.
- Version 13.2
- Added WebView.SetPrintParameter and WebView.GetPrintParameter for Windows with this parameters: paperWidth, paperHeight, bottomMargin, topMargin, leftMargin, rightMargin, orientation and shouldPrintBackgrounds.
- Version 13.1
- Added shouldPrintBackgrounds parameter for WebView.SetPrintParameter for use in WebKit 1 and 2.
- Version 10.3
- Added iOS support for WebView.SetPrintParameter and WebView.GetPrintParameter. Currently only supporting JobName and Orientation as settings.
Blog Entries
- MBS Plugin 14.1 for Claris FileMaker
- Printing a WebViewer in FileMaker
- MBS FileMaker Plugin, version 14.1pr2
- MBS Plugin 13.2 for Claris FileMaker
- MBS FileMaker Plugin, version 13.2pr5
- MBS FileMaker Plugin, version 13.1pr2
- Print web viewer on iOS
- Print WebViewer on macOS in FileMaker
- MBS FileMaker Plugin, version 5.2pr8
- MBS Filemaker Plugin, version 2.1 final candidate
FileMaker Magazin
This function checks for a license.
Created 18th August 2014, last changed 12nd February 2024