public abstract class CefPrintHandlerAdapter extends CefNativeAdapter implements CefPrintHandler
构造器和说明 |
---|
CefPrintHandlerAdapter() |
限定符和类型 | 方法和说明 |
---|---|
java.awt.Dimension |
getPdfPaperSize(int deviceUnitsPerInch)
Called to retrieve the page size when printToPDF is requested for a browser.
(当浏览器请求printToPDF时,调用此方法来检索页面大小。)
|
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, setNativeRef
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getNativeRef, setNativeRef
public java.awt.Dimension getPdfPaperSize(int deviceUnitsPerInch)
CefPrintHandler
getPdfPaperSize
在接口中
CefPrintHandler
deviceUnitsPerInch
- The DPI of the print. Use this to calculate the page size to use.
(-打印的DPI。使用它来计算要使用的页面大小。)
public boolean onPrintDialog(CefBrowser browser, boolean hasSelection, CefPrintDialogCallback callback)
CefPrintHandler
onPrintDialog
在接口中
CefPrintHandler
browser
- The corresponding browser.
(-相应的浏览器。)
hasSelection
- True if the user has selected a region of the page to print.
(-如果用户选择了要打印的页面区域,则为True。)
callback
- Callback to execute after the dialog is dismissed.
(-取消对话框后执行回调。)
public boolean onPrintJob(CefBrowser browser, java.lang.String documentName, java.lang.String pdfFilePath, CefPrintJobCallback callback)
CefPrintHandler
onPrintJob
在接口中
CefPrintHandler
browser
- The corresponding browser.
(-相应的浏览器。)
documentName
- Name of the document that is printing.
(-正在打印的文档名称。)
pdfFilePath
- Path to the PDF file that contains the document contents.
(-包含文档内容的PDF文件的路径。)
callback
- Callback to execute after the print job has completed.
(-打印作业完成后执行回调。)
public void onPrintReset(CefBrowser browser)
CefPrintHandler
onPrintReset
在接口中
CefPrintHandler
browser
- The corresponding browser.
(-相应的浏览器。)
public void onPrintSettings(CefBrowser browser, CefPrintSettings settings, boolean getDefaults)
CefPrintHandler
onPrintSettings
在接口中
CefPrintHandler
browser
- 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.
(-如果为true |设置|应该使用默认打印设置进行填充。)
public void onPrintStart(CefBrowser browser)
CefPrintHandler
onPrintStart
在接口中
CefPrintHandler
browser
- The corresponding browser.
(-相应的浏览器。)