HTML2PS and HTML2PDF - Best HTML to PDF Converter
I’ve been doing a project lately that requires HTML2PDF generation and I was getting quite depressed at the 2 available options I’d found to do it with PHP: dompdf and html2fpdf. After trying to get them to work with the html template I set up I quickly realized that they just weren’t going to work (both had problems processing images). After doing another Google search I found HTML2PS and HTML2PDF and it is practically a miracle! It seems to work pretty much the same as the Adobe PDF print driver, which is exactly what I want. The output from this program looks the same as if you would have printed it out - awesome. It’s open source and doesn’t have any odd requirements.
HTML2PS and HTML2PDF Pros and Cons
Features: “Supports nested tables, advanced CSS properties, floating DHTML elements, non-Latin character sets, XHTML and non-XHTML tags and properties, and much more. Nearly any website, even very complex ones like Yahoo.com, can be accurately converted to PostScript or PDF.”
The only drawback I’ve found so far is that it chokes on images created from javascript apps (like mybloglog). That means I can’t render out a pdf of devtrench.com with images, but it works without images and looks good. This really doesn’t bother me because I’m rendering a static html page that is pretty basic, so it is kind of a non issue for me.

Comment by Bob Ritchie
on 25 Jan 2008 at 8:31 am #
What’s your experience with the situation reversed: PSD to HTML? Have tried out a couple, including Adobe’s offering, but not found anything suitable.
Comment by James Ehly
on 25 Jan 2008 at 2:14 pm #
Hi Bob,
I assume you mean PDF 2 HTML, and honestly I haven’t gone down that road for a long time. In 2000 I converted quite a few pdfs to HTML but I can’t remember what program I used, some online service I’m sure.
If you do mean PSD 2 HTML then I recommend the folks at psd2html.com. They do a pretty good job
Comment by d joseph
on 12 Oct 2008 at 1:19 pm #
Hi James,
I am trying to use this html2pdf package. I have a requirement
to print different pages with either landscape or portrait orientations. Did you have any experience with customizing page by page?
Thanks
dj
Comment by James Ehly
on 13 Oct 2008 at 1:47 pm #
I have experience creating batches of either landscape or portrait oriented web pages, but not combining those in a single document. The forum might be a good place to look http://forum.tufat.com/forumdisplay.php?f=58 if you haven’t tried that already.