Interface PrintCallback

All Superinterfaces:
AsyncCallback<PrintCallback.Params,PrintCallback.Action>, BrowserAsyncCallback<PrintCallback.Params,PrintCallback.Action>, BrowserCallback, Callback
All Known Implementing Classes:
DefaultPrintCallback, DefaultPrintCallback, DefaultPrintCallback

public interface PrintCallback extends BrowserAsyncCallback<PrintCallback.Params,PrintCallback.Action>
This callback is invoked when the printing is about to start.

In this callback you can proceed with the printing, cancel it, or display the print preview dialog where you can configure the print settings and print the currently loaded web page. If you choose to proceed with the printing by invoking PrintCallback.Action.print(), then either PrintHtmlCallback or PrintPdfCallback will be invoked to configure the print settings.

If this callback is invoked when the browser is loading a web page, then the print preview dialog may not be shown, and PrintHtmlCallback or PrintPdfCallback may not be invoked.

By default, the printing is canceled.

You can directly cancel printing by invoking PrintCallback.Action.cancel(). To print using the print preview dialog, the PrintCallback.Action.showPrintPreview() method must be invoked.

If the callback throws an exception, the PrintCallback.Action.cancel() method will be invoked.