Wiki HTML2PDF V4 - English

Html2pdf V4 is now written entirely in PHP5 and uses TCPDF instead of FPDF.

IMPORTANT: Html2pdf has changed, and how to handle errors. Look at the examples.

Initalizing The HTML2PDF Class

Below is the Constructor for the HTML2PDF Class :

 * Constructeur
 * @param	string		$sens - landscape or portrait orientation
 * @param	string		$format - format A4, A5, ...
 * @param	string		$langue - language: fr, en, it ... 
 * @param	boolean		$unicode - TRUE means clustering the input text IS unicode (default = true)
 * @param 	String		$encoding - charset encoding; Default is UTF-8
 * @param	array		$marges - margins by default, in order (left, top, right, bottom)
 * @return	null
public function __construct($sens = 'P', $format = 'A4', $langue='en', $unicode=true, $encoding='UTF-8', $marges = array(5, 5, 5, 8))

A very simple example of use :

$html2pdf = new HTML2PDF('P', 'A4', 'en');
$html2pdf->writeHTML('<p>This is your first PDF File</p>');

Preparing the PDF Document

Output a PDF File

HTML Tags Explained

Aditional Information

html2pdf/en/v4/accueil.txt · Last modified: d/m/Y H:i:s by nazgod
Back to top = chi`s home Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0