Exporting Methods for DHTMLX Gantt. Preview of Export Module Update

Exporting is a highly-demanded addition for any JavaScript library intended for project management applications, and our Gantt component also supports this feature.

Project managers frequently convert Gantt charts into PDF, PNG, Excel, iCal, MS Project, or Oracle’s Primavera to handle their projects more efficiently. For example, charts exported to PDF/PNG can be printed or sent by email. All these formats are currently supported by DHTMLX Gantt and users can download their Gantt chart project via our online service or a local module. Our development team always works on ways to improve the current exporting functionality and add new capabilities.

In this blog post, we will take a closer look at the available exporting methods from DHTMLX Gantt and shed some light on the upcoming update for the export module that will have a positive impact on exporting to PDF/PNG formats.

Exporting options for DHTMLX Gantt

As mentioned above, there are two ways to export instances of your Gantt charts into available formats but there are some peculiarities that should be taken into account by users when it comes to using the proposed methods. Let us delve into details.

Online Service
By default, it is possible to export Gantt charts to the required format using our free online service. When selecting this option, users have to send their Gantt data to our server. Users should not worry about security issues, as we do not convey their data to any third parties and all temporary files are removed automatically after the export completion. Charts exported via the online service can contain a DHTMLX watermark if users employ an open-source version of our Gantt component. Under the active PRO licenses, it is possible to convert Gantt charts into needed formats without the watermark.

It is also important to point out that the maximum request size of Gantt charts that can be exported to all available formats via the online service is 10 MB. But for MS Project the endpoint can be expanded to 40 MB.

Export Module
If users want to export even more safely and reliably, they can make use of a local export module. DHTMLX offers 2 export modules:

  1. When it is necessary to export the data to PDF, PNG, Excel, and iCal formats, the module can be installed on any platform as a Node.js application or as a Docker image.
  2. If Gantt chart projects have to be exported to MS Project and Primavera formats, then the module is presented as an application developed from ASP.NET that operates on Windows and IIS. This module is supplied as the source code and can be deployed on the user’s server.

Thus, the module becomes a more secure and reliable way of exporting Gantt charts, as users don’t have to send data to external servers and need no internet connection. Using the module, users don’t have to be concerned about any data leakages and can export their projects without watermarks.
Here is the example of exporting a Gantt chart that contains numerous project tasks and dependencies between them to PDF format.

Under the Ultimate license (and the Enterprise when exporting only to PDF, PNG, Excel, iCal), the export module comes free of charge, while for other licensing options the module can be acquired separately. Before using this option, we recommend you to become familiar with system requirements and terms of use.

Upcoming Export Module Update (PhantomJS vs Electron)

For quite a while, our export module has been relying on PhantomJS as a solution for rendering charts on the page and saving them to PDF/PNG. However, this technology has already become outdated.
When using the PDF/PNG export module, the maximum exporting capability is measured by the number of tasks and year scale for PDF and the chart size for PNG. Currently, PhantomJS allows exporting charts with no more than 1000 tasks and a 10-year scale for PDF, and 16384×16384 px (or 300 tasks, 1-year) for PNG.

Therefore, our development team is currently working on a major update for the export module that implies switching from PhantomJS to Electron. Using the Electron framework as a new rendering engine for our export module will provide the following advantages:

  • Exporting large charts

During a test stage of the module update, we’ve successfully exported Gantt charts to PDF with thousands of tasks and multiple years of time scale with day columns. The execution time was under 20 seconds. Technically, if you install the export service locally, you should be able to export much larger charts to PDF, but the execution time will increase with the size of the chart. Speaking about PNG, the updated module will allow users to export sizeable charts by chunks, which can be later recombined (maximum chunk size will be around 10000*10000 px).

  • Multipage export

The update will also enable users to export the data on several pages by cutting charts into several pages.

  • Page orientation

If users indicate the page format during the export, they will be able to specify its orientation.

  • Improved support of CSS and HTML-elements

PhantomJS does not support many modern CSS styles and HTML elements. The adoption of Electron should solve this problem and fix some other bugs related to exporting charts built with DHTMLX Gantt.

In this article, we have reviewed current exporting capabilities for DHTMLX Gantt and got familiar with the new features of the export module that will be included in the upcoming update. If you utilize the export module under the active license, contact our support team for obtaining a candidate version of the new module before its official release.

Related Materials:

Advance your web development with DHTMLX

Gantt chart
Event calendar
Diagram library
30+ other JS components