Asad Habib wrote:
Has anyone successfully used htmltopdf, a PHP script written by Jason
Rust (www.rustyparts.com) to convert an HTML file to PDF, with Zope?
In particular, I wanted to find out if anyone had used the python
equivalent of this PHP script.
We've been looking into this recently. Raw notes on various tools and
links below, first on HTML to pdf/ps, and then on HTML to image
(jpeg/png) directly, which is ultimately what we need to do.
The main thing is that many of the html to ps/pdf tools don't handle CSS
well, if at all. The big exception there is shown (with a live demo) at
http://www.tufat.com/script19.htm. It's fabulous - handles pages from
csszengarden quite well.
At the moment, we're going with a simpler approach to our problem
(watermarks), but if we went the HTML to PDF/image route, I'd look at
the tufat.com script, or the approach noted at the hackdiary.com link.
HTML TO PDF/PS CONVERSION
"html to pdf in php":http://www.rustyparts.com/pdf.php
"python script for html to pdf
"html2doc":http://www.easysw.com/htmldoc , a proprietary tool
"denature":http://denature.sourceforge.net/, html to pdf via xsl/fo in Perl
other "html to pdf":http://tinyurl.com/a8u7q tools at Freshmeat
Zope cookbook has a "recipe":http://zopelabs.com/cookbook/1069611008
using (yum-able) "recode":http://www.gnu.org/software/recode/recode.html
and "html2doc":http://www.htmldoc.org/ aka a "product from
ESP":http://www.easysw.com/htmldoc/ (under GNU license)
* there's also the apparently very simple
There is a "php version of html2ps":http://www.tufat.com/script19.htm
which handles background images, e.g. from here
HTML TO IMAGE CONVERSION
* "html2jpg":http://freshmeat.net/projects/html2jpg/ "project
page":http://marginalhacks.com/Hacks/html2jpg/ (requires mozilla)
* "khtml2png":http://directory.fsf.org/webauth/misc/khtml2png.html (not
maintained) also used
* "another python-based
app":http://www.hackdiary.com/archives/000055.html(may be the most
* "Easy capture":http://www.perturb.org/display/entry/728/ for the PHP
environment (not HTML, just images)
* using "PHP and GD":http://www.sitepoint.com/print/watermark-images-php
Zope maillist - Zope@zope.org
** No cross posts or HTML encoding! **
(Related lists -