DHTMLx gantt chart hide columns on export

I want to hide columns like add while exporting to pdf.

My add column configuration is:

{name: "add", width: 44,  align: "center", resize: true},

My export code is:

gantt.exportToPDF({skin: "skyblue", raw:"true", name:"gantt.pdf"});

I just want to hide this column on export, how could I do it?

Hello,
When you export the data with the raw: true parameter, Gantt saves all HTML elements of the Gantt container and sends them to the export server:
https://docs.dhtmlx.com/gantt/desktop__export.html#parametersoftheexportmethods
So you need to modify the column configuration before exporting the data, then revert the changes.

To change the column visibility, you need to enable the hide parameter for the columns you need:
https://docs.dhtmlx.com/gantt/desktop__specifying_columns.html#visibility

Here is an example:
https://snippet.dhtmlx.com/kyo24fnw

Another way is to backup the column settings, modify the existing settings, export the data, and revert the changes:
https://snippet.dhtmlx.com/9nuwfdtp