I’m using the exportToPNG function with GPL License since years but this export doesn’t work anymore. I Have tested on several web browser but the export is still not working. (I’m using the dhtmlx-gantt 4.2.1)
When I call the export function a png is generated with the columns headers but no gantt is printed.
In the bottom of my png file there is the following message : This document is created with dhtmlx library
I Have tested with PDF export but there is the same problem.
I tried to reproduce this issue in the gantt “v4.2.1” with the default “export to pdf/png” function: gantt.exportToPDF(); gantt.exportToPNG();
And export worked correctly, here is a screenshot:
I can suppose that the issue is connected with your “export function” or “export data”. On your screenshot, it looks like the “export function” returned the file without any data loaded. Unfortunately, I can’t detect the issue without more details.
Could you please provide me a kind of a demo where I will be able to reproduce the issue?
Regarding the “This document is created with dhtmlx library” line:
it is the watermark which is added automatically. You can read about it by the following link: https://docs.dhtmlx.com/gantt/desktop__export.html
I have tested you project and the export is working fine but I compared your Json data with mine and I noticed a differency : I have an end_date tag in the config and you don’t have this tag.
So I tried to remove it and after that the export was working ! But I don’t understand why the export does not work with this tag which is present since years.
I attach you my Json file, could you tell me if there is something wrong with it (especially with the end_date tag at line 300) ?
As a workaround, I can suggest you remove this config from your code to avoid the issue and set up the range inside the export function by “start/end” properties, like in this code fragment: