开发者

(HTML + CCS3 Generated Content for Paged Media) to PDF? [closed]

开发者 https://www.devze.com 2023-01-11 00:19 出处:网络
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_如何学运维
Closed. This question needs to be more focused. It is not currently accepting answers. 开发者_如何学运维

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 question

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


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号