PHP Class CakePdf\Pdf\Engine\WkHtmlToPdfEngine

Inheritance: extends CakePdf\Pdf\Engine\AbstractPdfEngine
Show file Open project: ceeram/cakepdf

Protected Properties

Property Type Description
$_binary string Path to the wkhtmltopdf executable binary

Public Methods

Method Description
__construct ( CakePdf $Pdf ) Constructor
output ( ) : string Generates Pdf from html

Protected Methods

Method Description
_exec ( string $cmd, string $input ) : string Execute the WkHtmlToPdf commands for rendering pdfs
_getCommand ( ) : string Get the command to render a pdf

Method Details

__construct() public method

Constructor
public __construct ( CakePdf $Pdf )
$Pdf CakePdf\Pdf\CakePdf CakePdf instance

_exec() protected method

Execute the WkHtmlToPdf commands for rendering pdfs
protected _exec ( string $cmd, string $input ) : string
$cmd string the command to execute
$input string Html to pass to wkhtmltopdf
return string the result of running the command to generate the pdf

_getCommand() protected method

Get the command to render a pdf
protected _getCommand ( ) : string
return string the command for generating the pdf

output() public method

Generates Pdf from html
public output ( ) : string
return string raw pdf data

Property Details

$_binary protected property

Path to the wkhtmltopdf executable binary
protected string $_binary
return string