Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 6 years ago.
Improve this questionIs 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
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:
- http://www.youtube.com/watch?v=vcXUrNSvjhU
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.
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.
精彩评论