html2pdf - convert your XHTML to PDF easily

I've created html2pdf PHP class, which allows one-click conversion of XHTML to PDF. It is an extension of FPDF class, found on http://www.fpdf.org.

Basic HTML2PDF features:

Example of usage:

Main class found in html2pd is createPDF. Its usage is best illustrated by this example:

include ('html2pdf.php');
$pdf =& new createPDF(
 $_POST['html'], // html text to publish
 $_POST['title'], // article title
 $_POST['url'], // article URL
 $_POST['author'], // author name
 time() );
$pdf->http='http://localhost/html2pdf/';
$pdf->directory='/www/html2pdf/';
$pdf->delete=10;
$pdf->useiconv=false;
$pdf->run();

Other possible parameters of html2pdf class can be found in its well commented source code.

File index.php includes online bookmarklet.

Download:

Download at http://radekhulan.cz/other/html2pdf.zip.

Fonts

Supplied fonts are Times and Courier. If you need more fonts, follow a tutorial at www.fpdf.org.

Example?

You want to try PDF export right now? Click on [Exports] link just under the current article.


00:24:00 - 15.07.07 - PHP - 115369x
TOPLIST.cz