(default)
Class CefPrintHandler
CefBase
|
+--CefPrintHandler
in cef_print_handler.h
- class CefPrintHandler
- extends CefBase
Implement this interface to handle events related to printing. The methods of
this class will be called on the UI thread.
Method Summary |
virtual bool |
GetPrintHeaderFooter( CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, const CefPrintInfo& printInfo, const CefString& url, const CefString& title, int currentPage, int maxPages, CefString& topLeft, CefString& topCenter, CefString& topRight, CefString& bottomLeft, CefString& bottomCenter, CefString& bottomRight )
Called to format print headers and footers. |
virtual bool |
GetPrintOptions( CefRefPtr< CefBrowser > browser, CefPrintOptions& printOptions )
Called to allow customization of standard print options before the print
dialog is displayed. |
GetPrintHeaderFooter
public virtual bool GetPrintHeaderFooter( CefRefPtr< CefBrowser > browser, CefRefPtr< CefFrame > frame, const CefPrintInfo& printInfo, const CefString& url, const CefString& title, int currentPage, int maxPages, CefString& topLeft, CefString& topCenter, CefString& topRight, CefString& bottomLeft, CefString& bottomCenter, CefString& bottomRight );
- Called to format print headers and footers. |printInfo| contains platform-
specific information about the printer context. |url| is the URL if the
currently printing page, |title| is the title of the currently printing
page, |currentPage| is the current page number and |maxPages| is the total
number of pages. Six default header locations are provided by the
implementation: top left, top center, top right, bottom left, bottom center
and bottom right. To use one of these default locations just assign a
string to the appropriate variable. To draw the header and footer yourself
return true. Otherwise, populate the approprate variables and return false.
GetPrintOptions
public virtual bool GetPrintOptions( CefRefPtr< CefBrowser > browser, CefPrintOptions& printOptions );
- Called to allow customization of standard print options before the print
dialog is displayed. |printOptions| allows specification of paper size,
orientation and margins. Note that the specified margins may be adjusted if
they are outside the range supported by the printer. All units are in
inches. Return false to display the default print options or true to
display the modified |printOptions|.
Chromium Embedded Framework (CEF) Copyright © 2011 Marshall A. Greenblatt