Gantt chart PDF rendering errors
When rendering the new Gantt chart (#6276) with a large chart, the PDF export gets off and creates multiple almost-empty pages.
Unfortunately, it looks like the older Gantt chart wasn't exporting PDFs correctly either so this section might need to be rethought.
#4 Updated by Greg Mefford over 7 years ago
From studying the existing code for rendering Gantt PDFs, it looks like it's a pagination issue where a possible solution would be to pre-compute what you want to render, paginate, then render each page. This is instead of just rendering as you go, which it seems is causing the overflow as soon as it's too much for a single page.
I'm going to look into it further, but don't let that stop someone else from fixing it; I can't guarantee I'll find the time to actually fix the bug.
#6 Updated by Greg Mefford over 7 years ago
- Status changed from New to Resolved
That Gantt code could use some more attention, but in the mean time, here is some code that generates proper PDFs with a large number of rows (like more than 50).
I've sent a pull request to edavis10 on Github, but in case he doesn't have time and someone else wants to integrate, here is a link:
#7 Updated by Jean-Philippe Lang over 7 years ago
- Status changed from Resolved to Closed
- Resolution set to Fixed
I fixed the problem in a similar way as your patch does, in r4474, thanks. This change takes part in some refactoring that I'm doing in order to get more reasonable response times for an average cross-project chart with a few hundreds issues.