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 p开发者_如何转开发lug-in for Trac. I have used Genshi library to generate charts.
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.
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.
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.
精彩评论