views:

41

answers:

3

Is there any way to render a PDF from a HTML doc styled with CSS3 Generated Content for Paged Media?

If there is not an application like that, what can I use as a base to build such a converter?

Thanks

+1  A: 

They only application I know of that can possibly convert HTML/CSS3 to good quality PDF is PrinceXML. (And it is my impression, that Google licensed and utilizes their code somehow in GoogleDocs for PDF export.)

However, this is a commercial application, and I think it comes with a hefty price tag.

One of it's leading lights is Håkon Lie, who is also behind all the technical achievements of the Opera web browser.

Here is a 2 years old Google Tech Talks video where Lie outlines some of the technologie behind PrinceXML:

pipitas
Thank you Pipitas, this was what I was looking for!
Victor P
Glad it solved your problem. :-)
pipitas
A: 

DOMPDF is an open source PHP project to convert HTML to PDF documents, but it doesn't support CSS3 generated content, but the project is very active. You are welcome to participate ! It's CSS 2.1 support is pretty good, and a few CSS3 properties have been added recently in the SVN trunk.

Fabien Ménager
Very promising, but still quite young. Thanks Fabien!
Victor P
A: 

wkhtmltopdf should handle this very nicely.

http://code.google.com/p/wkhtmltopdf/

Searching the web, I have found several command line tools that allow you to convert a HTML-document to a PDF-document, however they all seem to use their own, and rather incomplete rendering engine, resulting in poor quality. Recently QT 4.4 was released with a WebKit widget (WebKit is the engine of Apples Safari, which is a fork of the KDE KHtml), and making a good tool became very easy.good tool became very easy.

Bart
very interesting, but still very young. Thanks Bart!
Victor P