如何使用python打印在网络上生成的甘特图?

发布于 2024-08-27 01:00:37 字数 79 浏览 6 评论 0 原文

我想打印或保存甘特图(pdf 格式)。这些图表是在特定输入后在网络上生成的。我们的图表是 Trac 的插件。我使用 Genshi 库来生成图表。

I want to print or save gantt-chart(in pdf format). These charts are generated on web after a particular input. Our chart is a plug-in for Trac. I have used Genshi library to generate charts.

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

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

发布评论

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

评论(3

扮仙女 2024-09-03 01:00:37

Report Labs 有一个开源 Python 库,用于生成 PDF 文件。我自己没用过,但其他问题& SO 的答案都围绕着这个库,Report Lab Toolkit

There's an open source python library for generating PDF files by Report Labs. I've not used it myself, but other questions & answers on SO have revolved around this library, Report Lab Toolkit.

宛菡 2024-09-03 01:00:37

您能提供有关您的插件的更多信息吗? 甘特图插件位于 trac-hacks.org;是你用的那个还是定制的?如果是自定义的,是否可以在某个地方作为开源提供,以便我们可以看到您在做什么?

如果您将其实现为 wiki 宏,则可以使用 WikiToPdf 插件来执行此操作。

Can you give more information about your plugin? There is a gantt chart plugin on trac-hacks.org; is that the one you are using, or a custom one? If custom, is it available as Open Source somewhere so we can see what you are doing?

If you implemented this as a wiki macro, you can use the WikiToPdf plugin to do this.

无名指的心愿 2024-09-03 01:00:37

您可以使用 WeasyPrint 将 HTML 转换为 PDF。从他们的示例网站:

weasyprint http://www.w3.org/TR/CSS21/intro.html CSS21-intro.pdf -s http://weasyprint.org/samples/CSS21-print.css

根据提供的 HTML 页面和 CSS 创建 PDF 文件。这是一个Python实现。

You Could use WeasyPrint to convert HTML to PDF. From their example website:

weasyprint http://www.w3.org/TR/CSS21/intro.html CSS21-intro.pdf -s http://weasyprint.org/samples/CSS21-print.css

creates a PDF file based on the HTML page and CSS provided. This is a python implementation.

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