Gantt chart Export to PDF/PNG


#1

Hello,
I’ve noticed that when exporting to PDF/PNG baselines are not displayed? The chart itself looks good, but no baselines at all ! Is it a limitation or there is something that I need to do to be able export chart with all baselines etc … ? I’ve tried to include - gantt.exportToPDF({ raw: true }); but it doesn’t help either. Any help ? Thanks


#2

ok, I think I’ve found an answer on my question myself - we using the gpl version, which doesn’t support that.


#3

Export must fully reflect the Gantt in the browser ( so if you have a visible baseline and is using raw export mode - the same baseline must present in the export file ) If you have some customized elements, be sure to include used css styles into the export command.


#4

Stanislav - Thank you so much. Works as a charm ! спасибо ! lol


#5

Hi again,

Is there any chances that we can control how many tasks we can export to PDF? I mean, for the huge Projects, where we have 400+ tasks we want to limit to let say first 50 tasks per page, so it fits nicely on A4 page? Was able to do that https://docs.dhtmlx.com/gantt/desktop__export.html --> Setting a custom data source to export, to create an extra variable and limit it to first 50 tasks and it works fine on simple local html file with the hardcoded values, however, it doesn’t work within our App when using DB data. Is there any well explained tutorial or steps to follow? Thanks in advance.


#6

Hi,

Unfortunately at present time all tasks can be exported only to one page by default and we can’t provide you any solution or tutorial how to solve this issue.


#7

Hi Polina,

Thanks for a quick reply. Is there any workaround about it? We really like to add this functionality to our Gantt chart, so clients can easily export to PDF/PNG and print this off so that PDF is more or less readable. If we will install it in our own server, can we adjust settings in that case, e.g. print on more than 1 page or set limit to the tasks desplayed ?

Thanks in advance.


#8

Hello,

Now export works in the next way: script creates an HTML page where inserts Gantt in a full size.
Then this page is opened by Phantom JS, the size of window is adjusted and created a screenshot - i.e. you get one huge png or pdf sheet.

In theory, you can create many separate small-sized screenhots, of which there will be created a big one. To achieve this, you need to work with a window size and scrolling.
But Phantom JS is able to save only one screenshot to a file. So you’ll need additional way to combine several files into one document.


#9

Hi Polina,

Thanks for your quick reply. Ok, sounds a bit tricky but worth to try, as we really need this functionality. Is there any changes/improvements in Exporting to PDF/PNG services in the nearest future?

Thanks,
Спасибо!


#10

Yes, we are going to add the ability to print exported Gantt chart on multiple pages.
However, currently this feature has low priority, so I can’t give you any precise date when it could be developed.

You’re welcome!
Всегда пожалуйста :wink:


#11

Hi Polina,

Thanks again. Ok, that’s sounds promissing, so will keep an eye on next releases. Thanks, great job!

Have a good day, удачи ! :slight_smile:


#12

I upload 9.3 MB plan in gantt view there 422 task in this plan when I export gantt view in pdf and png its prints only few part of gantt task other part is blank ,please suggest me solution.


#13

Hello Kashyap,
We know about that bug, and it will be fixed in the future.
I cannot give you any ETA, but I will notify you when the issue is fixed.


#14

Hello everyone,
The dev team added a way to export large charts. Starting from the 7.0.4 version, it is possible to export huge charts:
https://docs.dhtmlx.com/gantt/whatsnew.html#704
With our online export server, you are limited to 20 seconds, so, usually, you can export up to 2000 tasks depending on the chart sizes.
If you use the local export module, it was tested, that you can export 50000 tasks within 138 years.