文档转换软件:XHTML 和 CSS 到 PDF
我有一个大型 XHTML 数据库,我希望使用 CSS 将其呈现为 PDF 和/或 RTF。是否有一个现成的/廉价的解决方案可以大规模地做到这一点?大意味着太字节。需要强大且擅长处理大量文件的东西。
I have a large database of XHTML that I wish to render as PDFs and/or RTF using CSS. Is there an off-the-shelf/cheap solution that could do this at scale? Large meaning terabytes. Need something that is robust and good at handling large volumes of files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
Prince XML 会是您想要的吗?
Would Prince XML be what you're looking for?
鉴于 XHTML 是 XML 的扩展,我建议使用 Apache FOP。它是迄今为止我用过的最好的pdf转换工具之一。
Given that XHTML is an extension from XML, I'd recommend using Apache FOP. It is one of the best pdf conversion tool I have ever used so far.
就你所说的规模而言,这是一个困难的问题。我建议查看 http://code.google.com/p/wkhtmltopdf/关于如何进行个人跑的想法。然而,每次想要转换文档时执行 shell 脚本可能不足以满足您的需求,因此我建议的方法是将其拼接到某种守护程序或批量转换实用程序中。
This is a difficult problem on the scale you're talking. I suggest looking at http://code.google.com/p/wkhtmltopdf/ for ideas on how you'd do the individual run. However, exec'ing a shell script each time you want to convert a document is probably inadequate for your needs, and so splicing this into some sort of daemon or mass-conversion utility is my suggested approach.
为此使用的技术是 XSLT (XSL-FO)。通常您使用 XML 作为源数据,但 XHTML 应该是有效的 XML。有不同的方法来运行它(例如,您可以使用 Cocoon 服务器)。
如果您正在寻找便宜或免费的软件,您可以在这里搜索:http://www.w3。 org/Style/XSL/
The technology you use for this is XSLT (XSL-FO). Normally you use XML as source data but XHTML should be valid XML. There are different ways to run this (For example you can use a Cocoon server).
If you are looking for a cheap or free software you can search here: http://www.w3.org/Style/XSL/