category OSS
package OSS_Pdf
copyright Copyright (c) 2007 - 2012, Open Source Solutions Limited, Dublin, Ireland
license New BSD License

 Methods

Take and set configuration parameters.

__construct(array $config, object $view) : void

Parameters

$config

array

default null An associative array of configuration options

$view

object

default null a Smarty view object

Generate the PDF file using the given template

generatePdf(string $pTemplate, \$pViewVariables $pViewVariables, \$pPdfFileName $pPdfFileName) : string

All required style files, includes, etc are either provided in the template as absolute paths or as relative paths to the template file.

Parameters

$pTemplate

string

$pViewVariables

\$pViewVariables

default null

$pPdfFileName

\$pPdfFileName

this will contain the full path to the PDF

Exceptions

\OSS_Pdf_PdfLatex_Exception

Returns

stringa binary string, the content of the PDF file

LaTeX syntax will conflict badly with Smarty.

_changeDelimiters(string $ld, string $rd) : void

As such, this function changes the Smarty delimiters to something unlikely to appear in a LaTeX file.

Parameters

$ld

string

Left delimiter

$rd

string

Right delimiter

LaTeX syntax will conflict badly with Smarty.

_resetDelimiters(string $ld, string $rd) 

This function resets the Smarty delimiters to their originals after _changeDelimiters() was used.

see \global\_changeDelimiters()
retur void

Parameters

$ld

string

Left delimiter

$rd

string

Right delimiter

 Properties

 

Options required for the class.

$_options : array
 

The Smarty view object (may also work with Zend_View but needs to be tested)

$_view : \Zend_View