Preview
Description
Invokes the Print Preview… pane in Internet Explorer. For ScriptX.Services the browser print dialog is shown with a preview of the content being printed (requires use of the ScriptX.Services Client Library).
Syntax
printing.Preview(oFrame)
Parameter | Description |
---|---|
oFrame |
[Optional] HTML frame to preview. By default, the top-level containing page will be previewed (i.e.
the whole browser window content). The use of this parameter is not part of the basic subset - a license is required. Without a license, default behaviour (preview the whole window) will occur. |
Selected Printer with ScriptX.Services
As the preview window is the host browser print dialog by default the selected printer will be the printer last used with the browser.
Chrome, Edge and Firefox all exhibit the same behaviour. If the last used printer in the browser is not the same as the printer intended for the print (in other words set using factory.printing.printer) then the “wrong” printer will be shown in the dialog.
This behaviour can be changed by changing the configuration of the browsers to use the system default printer for preview. The Script.Services Client Library emulation of Preview() sets the system default printer before the print dialog is shown and then resets to the previous value.
To change the behaviour perform an Internet search for “PrintPreviewUseSystemDefaultPrinter”. At the time of writing, this leads to the following information:
Firefox
Navigate to about:config and then search for print.save_print_settings and set false (default is true).