PHP Class CakePdf\Pdf\Engine\TexToPdfEngine

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

Protected Properties

Property Type Description
$_binary string Path to the tex binary of your choice.

Public Methods

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

Protected Methods

Method Description
_buildCommand ( ) : string Builds the command.
_cleanUpTexFiles ( string $texFile ) : void Clean up the files generated by tex.
_exec ( string $cmd, string $input ) : string Execute the latex binary commands for rendering pdfs
_getCommand ( ) : string Get the command to render a pdf
_writeTexFile ( ) : string Write the tex file.

Method Details

__construct() public method

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

_buildCommand() protected method

Builds the command.
protected _buildCommand ( ) : string
return string The command with params and options.

_cleanUpTexFiles() protected method

Clean up the files generated by tex.
protected _cleanUpTexFiles ( string $texFile ) : void
$texFile string Tex file name.
return void

_exec() protected method

Execute the latex binary 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

_writeTexFile() protected method

Write the tex file.
protected _writeTexFile ( ) : string
return string Returns the file name of the written tex file.

output() public method

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

Property Details

$_binary protected property

Path to the tex binary of your choice.
protected string $_binary
return string