How large is the system you're targeting? If you can afford to run a Python interpreter and a copy of Inkscape (no X needed), there's a great toolchain available.
Last time I faced the kind of problem space you're in, I used Inkscape to render SVG to PDF in non-GUI mode, as follows:
...where the SVG is built using template substitution. (In doing this in the past, I used the Genshi template language for building the templates, which happens to interoperate wonderfully with Inkscape's GUI functionality -- Inkscape-the-GUI-SVG-editor doesn't remove tags in namespaces it doesn't recognize, so you can edit a SVG template in Inkscape even after marking it up to work as a Genshi template!)
My use case was automatic generation of cover pages for outgoing fax jobs; a complete set of scripts implementing this method for HylaFAX+ is available in the mailing list archive here.
发布评论
评论(3)
您的目标系统有多大? 如果您有能力运行 Python 解释器和 Inkscape 副本(不需要 X),那么就有一个很棒的工具链可用。
上次我遇到您所处的问题空间时,我使用 Inkscape 在非 GUI 模式下将 SVG 渲染为 PDF,如下所示:
...其中 SVG 是使用模板替换构建的。 (在过去这样做时,我使用 Genshi 模板语言来构建模板,它恰好可以互操作Inkscape 的 GUI 功能非常出色 - Inkscape-the-GUI-SVG-editor 不会删除它无法识别的名称空间中的标签,因此即使将其标记为 Genshi 模板,您也可以在 Inkscape 中编辑 SVG 模板! )
我的用例是自动生成传出传真作业的封面; 邮件列表存档 HylaFAX+ 实现此方法的完整脚本集://www.hylafax.org/archive/2007-10/msg00294.php" rel="nofollow noreferrer">此处。
How large is the system you're targeting? If you can afford to run a Python interpreter and a copy of Inkscape (no X needed), there's a great toolchain available.
Last time I faced the kind of problem space you're in, I used Inkscape to render SVG to PDF in non-GUI mode, as follows:
...where the SVG is built using template substitution. (In doing this in the past, I used the Genshi template language for building the templates, which happens to interoperate wonderfully with Inkscape's GUI functionality -- Inkscape-the-GUI-SVG-editor doesn't remove tags in namespaces it doesn't recognize, so you can edit a SVG template in Inkscape even after marking it up to work as a Genshi template!)
My use case was automatic generation of cover pages for outgoing fax jobs; a complete set of scripts implementing this method for HylaFAX+ is available in the mailing list archive here.
!!!
(这是一个网络服务器吗?否则,将文本文件作为报告并在 PC 上进行转换似乎更有意义。)
没有经验,但也许 libHaru ? 维基百科有一个PDF 软件列表。
!!!
(is this a webserver? Otherwise it seems like it would make more sense to spit out text files as reports and convert on a PC.)
No experience, but maybe libHaru ? Wikipedia has a list of PDF software.
看看 iText - 我以前用过它,效果很好。
(它是基于Java的,但你说“C或C++优先”,不是必需的)
Look at iText - I've used that before and it works well.
(It is Java-based, but you said "C or C++ is preferred", not required)