(HTML + CCS3 为分页媒体生成的内容)到 PDF?

发布于 2024-09-14 10:56:30 字数 1435 浏览 3 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

甜宝宝 2024-09-21 10:56:30

知道唯一可以将 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:

娇女薄笑 2024-09-21 10:56:30

wkhtmltopdf 应该很好地处理这个问题。

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

网上搜索了一下,发现
几个命令行工具允许
您将 HTML 文档转换为
PDF 文档,但它们似乎都
使用自己的,而且相当不完整
渲染引擎,导致效果不佳
质量。最近QT 4.4发布了
使用 WebKit 小部件(WebKit 是
Apples Safari 的引擎,这是一个
KDE KHtml 的分支),并制作一个
好的工具变得非常容易。好的工具变得非常容易。

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.

梦途 2024-09-21 10:56:30

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文