ppPDF Class Reference

Inherits Plugin.

Collaboration diagram for ppPDF:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 ppPDF ()
 convert ($html, $filename='')
 output ($filename='')
 set_paper ($size, $orientation='portrait')
 _convert_dompdf ($html, $filename)
 _convert_prince ($html, $filename)

Public Attributes

 $fn_pdf
 $tempdir
 $paper_size = 'letter'
 $paper_orientation = 'portrait'

Detailed Description

PRONTO WEB FRAMEWORK Copyright (C) 2006, Judd Vinet

Author:
Judd Vinet <jvinet@zeroflux.org>

Description: Convert HTML to PDF using DOMPDF or PrinceXML. You'll need the DOMPDF or Prince libraries in app/extlib/{prince,dompdf}

You should also put this in app/config/config.php:

// set to 'prince' or 'dompdf' define('PDF_BACKEND', 'prince');

Definition at line 18 of file pdf.php.


Member Function Documentation

ppPDF::_convert_dompdf ( html,
filename 
)

Definition at line 97 of file pdf.php.

References DS.

Referenced by convert().

ppPDF::_convert_prince ( html,
filename 
)

Definition at line 109 of file pdf.php.

References $cmd, and DS.

Referenced by convert().

ppPDF::convert ( html,
filename = '' 
)

Convert HTML into a PDF file.

Parameters:
string $html The HTML to convert to PDF
string $filename If set, resulting PDF file will be stored here. If empty, then a temporary file will be used until output() is called.

Definition at line 46 of file pdf.php.

References _convert_dompdf(), and _convert_prince().

ppPDF::output ( filename = ''  ) 

Send PDF output to browser.

Parameters:
string $filename Filename to use. If empty, then send directly to browser instead of sending as an attachment.

Definition at line 71 of file pdf.php.

ppPDF::ppPDF (  ) 

Definition at line 27 of file pdf.php.

References DS, and Plugin::Plugin().

ppPDF::set_paper ( size,
orientation = 'portrait' 
)

Set the paper size and orientation. This method is only relevant for the DOMPDF backend. For PrinceXML, use the "@page" CSS selector to set page size/margins/etc. See the PrinceXML site for documentation.

Definition at line 91 of file pdf.php.


Member Data Documentation

ppPDF::$fn_pdf

Definition at line 20 of file pdf.php.

ppPDF::$paper_orientation = 'portrait'

Definition at line 25 of file pdf.php.

ppPDF::$paper_size = 'letter'

Definition at line 24 of file pdf.php.

ppPDF::$tempdir

Definition at line 21 of file pdf.php.


The documentation for this class was generated from the following file:

Generated on Wed Jan 13 09:21:05 2010 for Pronto Framework by  doxygen 1.6.1