ady
ady

Reputation: 11

How to print gantt-charts generated on web using python?

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.

Upvotes: 1

Views: 798

Answers (3)

Rodolfo
Rodolfo

Reputation: 156

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.

Upvotes: 0

retracile
retracile

Reputation: 12339

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.

Upvotes: 0

MattH
MattH

Reputation: 38265

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.

Upvotes: 0

Related Questions