DotNetBrowser  1.14
Public Member Functions | List of all members
DotNetBrowser.PrintHandler Interface Reference

Allows handling printing initiated by Browser.Print method or More...

Public Member Functions

PrintStatus OnPrint (PrintJob printJob)
 This method is invoked when engine wants to get custom print settings and decide whether it should continue printing or not. If this method throws an exception, then printing will be canceled. This method will not block web browser engine. It's invoked asynchronously. You can display in this method Modal UI Print Dialog to ask user for custom print settings. More...
 

Detailed Description

Allows handling printing initiated by Browser.Print method or

window.print() JavaScript on the web page. You can use handler to get default print settings, provide custom print settings or cancel printing.

Member Function Documentation

PrintStatus DotNetBrowser.PrintHandler.OnPrint ( PrintJob  printJob)

This method is invoked when engine wants to get custom print settings and decide whether it should continue printing or not. If this method throws an exception, then printing will be canceled. This method will not block web browser engine. It's invoked asynchronously. You can display in this method Modal UI Print Dialog to ask user for custom print settings.

Parameters
printJobActive print job. Use it to access default print settings and modify them.
Returns
PrintStatus.CONTINUE to continue printing. PrintStatus.CANCEL to cancel printing.