I’ve reproduced the issue
docs.dhtmlx.com/gantt/snippet/56a9577d - 900 tasks, all seems ok although takes a while to generate a file.
docs.dhtmlx.com/gantt/snippet/a1446053 - 1000 tasks, error - pdf can’t be opened
Seems like there is some threshold of number of elements after which pdf can not be opened. We’ll investigate why is this happening.
As a solution, you can try changing a zoom level of a time scale before exporting, in order to print a chart with a lower detalization, e.g.[code]// set lower resolution for the export
var scaleUnit = gantt.config.scale_unit;
var subscales = gantt.config.subscales;
gantt.config.scale_unit = “month”;
gantt.config.subscales = ;
// restore settings back after export is complete
gantt.config.scale_unit = scaleUnit;
gantt.config.subscales = subscales;[/code]
docs.dhtmlx.com/gantt/snippet/1e69e362 - 1000 tasks, all seems ok again.
Alternatively, you can try exporting data by parts instead of printing the whole chart at once. You can do it using “data” property of exportToPDF config object
However, I’ve never got “Invalid JSON data” so maybe your issue is caused by something else. If it’s so - please provide some kind of demo, where we could reproduce it.