Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

(default)
Class CefPrintHandler

CefBaseRefCounted
   |
   +--CefPrintHandler

   in cef_print_handler.h

class CefPrintHandler
extends CefBaseRefCounted

Implement this interface to handle printing on Linux. Each browser will have only one print job in progress at a time. The methods of this class will be called on the browser process UI thread.


Method Summary
 virtual CefSize GetPdfPaperSize( int device_units_per_inch )
          Return the PDF paper size in device units.
 virtual bool OnPrintDialog( CefRefPtr< CefBrowser > browser, bool has_selection, CefRefPtr< CefPrintDialogCallback > callback )= 0
          Show the print dialog.
 virtual bool OnPrintJob( CefRefPtr< CefBrowser > browser, const CefString& document_name, const CefString& pdf_file_path, CefRefPtr< CefPrintJobCallback > callback )= 0
          Send the print job to the printer.
 virtual void OnPrintReset( CefRefPtr< CefBrowser > browser )= 0
          Reset client state related to printing.
 virtual void OnPrintSettings( CefRefPtr< CefBrowser > browser, CefRefPtr< CefPrintSettings > settings, bool get_defaults )= 0
          Synchronize |settings| with client state.
 virtual void OnPrintStart( CefRefPtr< CefBrowser > browser )= 0
          Called when printing has started for the specified |browser|.
   
Methods inherited from class CefBaseRefCounted
AddRef, Release, HasOneRef, HasAtLeastOneRef
 

Method Detail

GetPdfPaperSize

public virtual CefSize GetPdfPaperSize( int device_units_per_inch );
Return the PDF paper size in device units. Used in combination with CefBrowserHost::PrintToPDF().

OnPrintDialog

public virtual bool OnPrintDialog( CefRefPtr< CefBrowser > browser, bool has_selection, CefRefPtr< CefPrintDialogCallback > callback )= 0;
Show the print dialog. Execute |callback| once the dialog is dismissed. Return true if the dialog will be displayed or false to cancel the printing immediately.

OnPrintJob

public virtual bool OnPrintJob( CefRefPtr< CefBrowser > browser, const CefString& document_name, const CefString& pdf_file_path, CefRefPtr< CefPrintJobCallback > callback )= 0;
Send the print job to the printer. Execute |callback| once the job is completed. Return true if the job will proceed or false to cancel the job immediately.

OnPrintReset

public virtual void OnPrintReset( CefRefPtr< CefBrowser > browser )= 0;
Reset client state related to printing.

OnPrintSettings

public virtual void OnPrintSettings( CefRefPtr< CefBrowser > browser, CefRefPtr< CefPrintSettings > settings, bool get_defaults )= 0;
Synchronize |settings| with client state. If |get_defaults| is true then populate |settings| with the default print settings. Do not keep a reference to |settings| outside of this callback.

OnPrintStart

public virtual void OnPrintStart( CefRefPtr< CefBrowser > browser )= 0;
Called when printing has started for the specified |browser|. This method will be called before the other OnPrint*() methods and irrespective of how printing was initiated (e.g. CefBrowserHost::Print(), JavaScript window.print() or PDF extension print button).

 Overview   Project   Class   Tree   Index 
CEF3 C++ API Docs - Version 75.1.4+g4210896+chromium-75.0.3770.100
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

Chromium Embedded Framework (CEF) Copyright © 2016 Marshall A. Greenblatt