# Interface ICefPrintHandler

Description
Hierarchy
Fields
Methods
Properties

## Unit

uCEFInterfaces

## Declaration

`type ICefPrintHandler = interface(ICefBaseRefCounted)`

## Description

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

UNKNOWN

<see href="https://bitbucket.org/chromiumembedded/cef/src/master/include/capi/cef_print_handler_capi.h">CEF source file: /include/capi/cef_print_handler_capi.h (cef_print_handler_t))

## Hierarchy

- IInterface
- ICefBaseRefCounted
- ICefPrintHandler

## Overview

### Methods

| `procedure OnPrintStart(const browser: ICefBrowser);`
| `procedure OnPrintSettings(const browser: ICefBrowser; const settings: ICefPrintSettings; getDefaults: boolean);`
| `procedure OnPrintDialog(const browser: ICefBrowser; hasSelection: boolean; const callback: ICefPrintDialogCallback; var aResult: boolean);`
| `procedure OnPrintJob(const browser: ICefBrowser; const documentName, PDFFilePath: ustring; const callback: ICefPrintJobCallback; var aResult: boolean);`
| `procedure OnPrintReset(const browser: ICefBrowser);`
| `procedure GetPDFPaperSize(const browser: ICefBrowser; deviceUnitsPerInch: integer; var aResult: TCefSize);`
| `procedure RemoveReferences;`

## Description

### Methods

| `procedure OnPrintStart(const browser: ICefBrowser);`
Called when printing has started for the specified |browser|. This function will be called before the other OnPrint*() functions and irrespective of how printing was initiated (e.g. ICefBrowserHost.print(), JavaScript window.print() or PDF extension print button). ###### Attributes GUID['{2831D5C9-6E2B-4A30-A65A-0F4435371EFC}']

| `procedure OnPrintSettings(const browser: ICefBrowser; const settings: ICefPrintSettings; getDefaults: boolean);`
Synchronize |settings| with client state. If |get_defaults| is true (1) then populate |settings| with the default print settings. Do not keep a reference to |settings| outside of this callback.

| `procedure OnPrintDialog(const browser: ICefBrowser; hasSelection: boolean; const callback: ICefPrintDialogCallback; var aResult: boolean);`
Show the print dialog. Execute |callback| once the dialog is dismissed. Return true (1) if the dialog will be displayed or false (0) to cancel the printing immediately.

| `procedure OnPrintJob(const browser: ICefBrowser; const documentName, PDFFilePath: ustring; const callback: ICefPrintJobCallback; var aResult: boolean);`
Send the print job to the printer. Execute |callback| once the job is completed. Return true (1) if the job will proceed or false (0) to cancel the job immediately.

| `procedure OnPrintReset(const browser: ICefBrowser);`
Reset client state related to printing.

| `procedure GetPDFPaperSize(const browser: ICefBrowser; deviceUnitsPerInch: integer; var aResult: TCefSize);`
Return the PDF paper size in device units. Used in combination with ICefBrowserHost.PrintToPdf().

| `procedure RemoveReferences;`
Custom procedure to clear all references.

Generated by PasDoc 0.16.0-snapshot.