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.
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 at https://radekhulan.cz/other/html2pdf.zip.
Supplied fonts are Times and Courier. If you need more fonts, follow a tutorial at www.fpdf.org.
You want to try PDF export right now? Click on [Exports] link just under the current article.