RequestPrintSync
Interface AntViewDocument
Type: Method
Parameters: none
Returns: Integer
Invoke the print dialog from the host application.
This uses the javascript window.print(); command under the hood and does not offer any customizations.
Beware that you cannot detect if the user pressed "Ok" or "Cancel" on the print dialog.
The function returns:
0 if no errors.
21 function is already running (can only run one at a time)
22 function timed out
23 document not connected to WebView2 control
25 Trying to run a synchronous method from within a WebView2 event
As this invokes a user modal dialog, you most likely want to adjust the time out via SynchronousTimeOut to something else than the default which is 1 second.
The Synchronous alternative of the RequestPrint method.
As the function wraps the async bits, you cannot have the asynchronous variant running when you call this.
Beware that you cannot use a synchronous call from within an AntView event.
Introduced in AntView release 1.1.236
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/30/2024