public abstract class CefPrintHandlerAdapter extends CefNativeAdapter implements CefPrintHandler
| Constructor and Description |
|---|
CefPrintHandlerAdapter() |
| Modifier and Type | Method and Description |
|---|---|
java.awt.Dimension |
getPdfPaperSize(CefBrowser browser,
int deviceUnitsPerInch)
Called to retrieve the page size when printToPDF is requested for a browser.
|
boolean |
onPrintDialog(CefBrowser browser,
boolean hasSelection,
CefPrintDialogCallback callback)
Called to show the print dialog.
|
boolean |
onPrintJob(CefBrowser browser,
java.lang.String documentName,
java.lang.String pdfFilePath,
CefPrintJobCallback callback)
Called to send the print job to the printer.
|
void |
onPrintReset(CefBrowser browser)
Called to reset client state related to printing.
|
void |
onPrintSettings(CefBrowser browser,
CefPrintSettings settings,
boolean getDefaults)
Called to get print settings.
|
void |
onPrintStart(CefBrowser browser)
Called when printing has started.
|
getNativeRef, setNativeRefclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetNativeRef, setNativeRefpublic java.awt.Dimension getPdfPaperSize(CefBrowser browser, int deviceUnitsPerInch)
CefPrintHandlergetPdfPaperSize in interface CefPrintHandlerbrowser - The corresponding browser.deviceUnitsPerInch - The DPI of the print. Use this to calculate the page size to use.public boolean onPrintDialog(CefBrowser browser, boolean hasSelection, CefPrintDialogCallback callback)
CefPrintHandleronPrintDialog in interface CefPrintHandlerbrowser - The corresponding browser.hasSelection - True if the user has selected a region of the page to print.callback - Callback to execute after the dialog is dismissed.public boolean onPrintJob(CefBrowser browser, java.lang.String documentName, java.lang.String pdfFilePath, CefPrintJobCallback callback)
CefPrintHandleronPrintJob in interface CefPrintHandlerbrowser - The corresponding browser.documentName - Name of the document that is printing.pdfFilePath - Path to the PDF file that contains the document contents.callback - Callback to execute after the print job has completed.public void onPrintReset(CefBrowser browser)
CefPrintHandleronPrintReset in interface CefPrintHandlerbrowser - The corresponding browser.public void onPrintSettings(CefBrowser browser, CefPrintSettings settings, boolean getDefaults)
CefPrintHandleronPrintSettings in interface CefPrintHandlerbrowser - The corresponding browser.settings - Populate with the desired print settings. Do not keep a reference to this
object outside of this callback.getDefaults - If true |settings| should be populated with the default print settings.public void onPrintStart(CefBrowser browser)
CefPrintHandleronPrintStart in interface CefPrintHandlerbrowser - The corresponding browser.