将矢量图像/图表嵌入 PDF 的方法

发布于 2024-09-12 22:48:44 字数 375 浏览 0 评论 0原文

Linux 世界的人们如何将矢量图像嵌入到 PDF 中?

我正在尝试根据当前呈现为 SVG 图像的数据创建自动报告。理想情况下,我希望使用 PostScriptPDFDjVu 格式的相同 XML。这些格式能够在多大程度上原生处理 SVG?

更广泛地说,人们的经历是什么?我应该

  1. 重用原生 SVG XML 吗?
  2. 栅格化已经创建的 SVG?
  3. 或者使用其他格式?

我仅限于可从 Ubuntu 10.04 和 Ubuntu 10.04 访问的格式。 Python。这可能会让我无法使用 Adob​​e 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

  1. reuse the native SVG XML?
  2. rasterise SVGs that have already been created?
  3. 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 技术交流群。

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

发布评论

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

评论(2

如痴如狂 2024-09-19 22:48:44

调查Apache FOP,它的主要目的是将XML转换为PDF。

优点(对于这个项目):

  • 完整的 Apache 项目(=>可靠)

缺点(对于这个项目):

  • 需要学习 XSL-FO
  • 不是 Python

Investigate Apache FOP, its main purpose is to convert XML to PDF.

Upsides (for this project):

  • full Apache project (=> reliable)

Downsides (for this project):

  • Will need to learn XSL-FO
  • Not Python
吐个泡泡 2024-09-19 22:48:44

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.

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