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: 11.0   11.1   11.2   11.3   11.4   11.5   12.0   12.1   12.2   12.3    Statistic    FMM    Blog  


Sets print parameters for WebView.Print method.

Component Version macOS Windows Linux Server iOS SDK License
WebView 2.1 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes Paid
MBS( "WebView.SetPrintParameter"; ParameterName; ParameterValue )   More


Parameter Description Example
ParameterName The name of the parameter.
For MacOS, can be horizontallyCentered, verticallyCentered, showPrintPanel, orientation, printer, bottomMargin, topMargin, leftMargin or rightMargin.
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


Returns OK or an error message.


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.

Version 5.2 adds PaperName, PaperWidth and PaperHeight.
Use WebView.GetPrintParameter to query.

Version 10.3 adds iOS support with settings for orientation and JobName.


Sets bottom margin to 5 points:

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:

MBS("WebView.SetPrintParameter"; "paperName"; "iso-a4")

Set landscape:

MBS("WebView.SetPrintParameter"; "orientation"; "landscape")

See also

Release notes

Example Databases

Blog Entries

Created 18th August 2014, last changed 9th July 2020

WebView.SetPreferences - WebView.SetPrivateBrowsing

Feedback: Report problem or ask question.

Start Chat