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?

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:
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:

Here is an example:

Another way is to backup the column settings, modify the existing settings, export the data, and revert the changes: