How to get the PrintPreview window with HTMLRenderer ?

MiServer is Dyalog's APL-based web development framework

How to get the PrintPreview window with HTMLRenderer ?

Postby PGilbert on Fri Aug 14, 2020 3:02 pm

If you do in javascript window.print() in a Chrome debug window you will get the PrintPreview window. However when using the HTMLRenderer, window.print() will go directly to the Print window where you select the printer without any preview.

Is there a way to get the PrintPreview window with the HTMLRenderer ?
User avatar
PGilbert
 
Posts: 398
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to get the PrintPreview window with HTMLRenderer ?

Postby PGilbert on Fri Aug 14, 2020 3:56 pm

Found it. You need to add the following switch when starting the interpreter: -cef --enable-print-preview and to print directly to the default printer the switch is: -cef --kiosk-printing which does not seem to work when I tried it.

Sometimes we need to print silently to the default printer and sometimes we need to print with a Preview. This can all be done with Print() and ShowPrintPreviewDialog() in the System.Windows.Forms.WebBrowser (ShowPrintDialog() is available also).

Is there a ShowPrintPreviewDialog() methods hidden somewhere in CEF ? Because using start-up switches to select one or the other is not a choice for us.
User avatar
PGilbert
 
Posts: 398
Joined: Sun Dec 13, 2009 8:46 pm
Location: Montréal, Québec, Canada

Re: How to get the PrintPreview window with HTMLRenderer ?

Postby JohnD|Dyalog on Fri Sep 25, 2020 8:16 am

Hello Pierre,

There doesn't appear to be any equivalent to ShowPrintPreviewDialog in CEF. It looks like the command line option is the only way to do it.

Best Regards
John Daintree.
User avatar
JohnD|Dyalog
 
Posts: 66
Joined: Wed Oct 01, 2008 9:35 am


Return to MiServer

Who is online

Users browsing this forum: No registered users and 1 guest