Contents - Index - Top


RequestPrint

Interface AntViewDocument

 

Type: Method

Parameters: none

Returns: nothing

 

 

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.

 

As the request is run asynchronously, once the print dialog is closed, it will trigger the OnRequestPrintCompleted event.

 

There's also a synchronous alternative RequestPrintSync that wraps the above into one call.

 

Note that Microsoft is working on an official printing API for WebView2 (see Add API:Print #2604 and Specs Print.md), which has just gone into beta. This should give us better control over the whole printing interface once it is released.

 

Introduced in AntView release 1.1.236

 


AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/30/2024