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:
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 是一个开源 PHP 项目,用于将 HTML 转换为 PDF 文档,但它并不支持CSS3生成内容,而且该项目非常活跃。欢迎您参与! 它的 CSS 2.1 支持非常好,并且最近在 SVN 主干中添加了一些 CSS3 属性。
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.
发布评论
评论(3)
我知道唯一可以将 HTML/CSS3 转换为高质量 PDF 的应用程序是 PrinceXML。 (我的印象是,Google 在 GoogleDocs 中以某种方式许可并利用他们的代码进行 PDF 导出。)
但是,这是一个商业应用程序,我认为它的价格很高。
Håkon Lie 是该领域的领军人物之一,他也是 Opera 网络浏览器所有技术成就的幕后推手。
这是一个已有 2 年历史的 Google 技术讲座视频,其中 Lie 概述了 PrinceXML 背后的一些技术:
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:
wkhtmltopdf 应该很好地处理这个问题。
http://code.google.com/p/wkhtmltopdf/
wkhtmltopdf should handle this very nicely.
http://code.google.com/p/wkhtmltopdf/
DOMPDF 是一个开源 PHP 项目,用于将 HTML 转换为 PDF 文档,但它并不支持CSS3生成内容,而且该项目非常活跃。欢迎您参与!
它的 CSS 2.1 支持非常好,并且最近在 SVN 主干中添加了一些 CSS3 属性。
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.