将矢量图像/图表嵌入 PDF 的方法
Linux 世界的人们如何将矢量图像嵌入到 PDF 中?
我正在尝试根据当前呈现为 SVG 图像的数据创建自动报告。理想情况下,我希望使用 PostScript
、PDF
或 DjVu
格式的相同 XML。这些格式能够在多大程度上原生处理 SVG?
更广泛地说,人们的经历是什么?我应该
- 重用原生 SVG XML 吗?
- 栅格化已经创建的 SVG?
- 或者使用其他格式?
我仅限于可从 Ubuntu 10.04 和 Ubuntu 10.04 访问的格式。 Python。这可能会让我无法使用 Adobe Illustrator 文件。
How have people from the Linux world embedded vector images into PDF?
I am attempting to create automated reports from data that I currently render as SVG images. Ideally, I would like to use the same XML in PostScript
, PDF
or DjVu
format. To what degree are those formats able to handle SVG natively?
More broadly, what have people's experiences been? Should I
- reuse the native SVG XML?
- rasterise SVGs that have already been created?
- or use another format?
I'm restricted to formats that are accessible from Ubuntu 10.04 & Python. This will probably exclude me from utilising Adobe Illustrator files.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
调查Apache FOP,它的主要目的是将XML转换为PDF。
优点(对于这个项目):
缺点(对于这个项目):
XSL-FO
Investigate Apache FOP, its main purpose is to convert XML to PDF.
Upsides (for this project):
Downsides (for this project):
XSL-FO
Batik 是一个不错的 Java SVG 库。它有一个名为 batik-rasterizer.jar 的实用程序库,可以将 SVG 转换为一些有用的格式:PDF、TIFF、PNG 和 GIF。
您可以使用 Jython 通过 python 链接到该库。
Batik is a nice Java SVG library. It has a utility library called batik-rasterizer.jar which can convert SVG into a some useful formats: PDF, TIFF, PNG, and GIF.
You could use Jython to link to this library with python.