Gantt Export PDF - blank document

Has anybody else had this problem? I’m getting a completely blank using Gantt v7.1.9.

I’m using the following: https://export.dhtmlx.com/gantt/api.js?v=7.1.9

and for the api: https://export.dhtmlx.com/gantt

The gantt chart is attached to a v5 TabBar element.

Calling gantt.exportToPDF() runs for a few moments, and downloads a blank pdf of around 120kB.

Richard

Hello Richard,
Probably, the issue is related to the Gantt configuration, but it is hard to suggest what might be wrong as I don’t see your code.
Please, add your configuration in the following snippet and make sure that the issue is reproduced there:
https://snippet.dhtmlx.com/38ee1b370
Then, click on the Share button and send me the link.
Or send me a ready demo with all the necessary Javascript and CSS files so that I can reproduce the issue locally.

Hello Ramil, and thanks for the speedy response - it is much appreciated!
Link to the snippet below:
SNIPPET: GANTT PDF EXPORT
Note that I have taken out local function references. The result is a blank pdf document.

Hello Richard,
I added the button to export the data, but it is exported correctly with and without the raw mode:
http://snippet.dhtmlx.com/5/bbd3c9a36

Please, make sure that the issue is reproduced in the snippet, then click on the Share button and send me the link.

Thanks Ramil - there must be something else in my config.
I will set up a simplified demo and see if the issue persists.
Regards

I copied just the basic files needed to another document root, and the PDF export works perfectly within a few seconds. However, on the production server it fails with “Internal server error. Error: Gantt to pdf. Error: Timeout trigger 20 seconds”.
The production server has the Gantt chart attached to a TabBar . while the copy has the Gantt in a

element - otherwise the configurations are identical: same JS code, (apart from some functions that are only on the production server), and same data.
There must, however, be some difference between the two scripts, and I will need to track it down.

UPDATE:
Using

gantt.exportToPDF({raw:true});

seems to work now.

Thanks for your help

Hello Richard,
I tried to reproduce the issue by adding Gantt to a toolbar, but it is exported correctly with and without the raw mode.
On our online export server, there is a 20-second limitation for the export process. It can happen if the chart is too big (and for that we recommend using the standalone export module that can be installed on your server) or if you have external styles or images that take more than 20 seconds to load (most of the time, server is available but not responding).

I can’t figure out what was causing the problem before, and what changes made it work, but it is definitely working now.
Many thanks