Hello @ramil
I want to export the Gantt chart as PDF or Excel… but it takes more time than expected to get the PDF and the chart part is exported successfully but cut off if there is a scroll in long scales… Is there a specific tip to make it more performant … here is a code sample used
Hello Wafia,
If you enable the raw mode for PDF export, Gantt needs to render all HTML elements, then it will send them to the export server. So, it is expected that it takes time to do that.
You can speed it up if you enable the static_background config, then Gantt will use the images of the timeline cells instead of actual HTML elements: https://docs.dhtmlx.com/gantt/api__gantt_static_background_config.html
Another thing you can do is to change the scale settings. If you have the day scale, you can change it to week or month, then it will take less time to render the timeline.
If the timeline is not fully displayed in the exported PDF file, that bug should occur because of the layout configuration. The dev team will fix it in the future, but I cannot give you any ETA.
Thanks for helping with this. there are few remaining points here
now to get the export using Gantt export it takes data to another URL. Is there a way to export it directly from the original app without redirecting it to another external service?
Hello Wafia,
You can use the standalone export module to import and export the data:
To use it, you need to specify the server URL in the server parameter:
Right now, there is no way to import and export the data only on the client-side without using the export server.
You can try using the html2canvas component to export the data to PNG, but the sizes are limited by the browser, and the maximal sizes are 16384х16384.
Here is the snippet:
For the PDF export, you can try using the native printing function in the browser, but in that case, you need to change the scale settings to fit the available formats:
Hello Wafia,
The dev team updated the PDF export module to the 0.7.0 version. This includes the fix for the bug when the timeline is not fully displayed when using the cols: [rows:[]] layout configuration and exporting with the raw: true parameter.
Here is full list of changes:
If you use the online export server, you can try the beta export server that uses the latest version of the export module.
You can check how it works in the following snippets:
Main server:
Beta server:
After some time, the main server will use the newer version of the export module.
If you use the standalone export module, you can download the new version from the Client’s Area:
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan