Dhtmlx-Error: Error: EACCES: permission denied, open '/data/exports/0000/2995940987'

const exportSettings = {
raw:true,
skin: “material”,
additional_settings: {
landscape: true,
format: “A3”,
},
callback: function (pdfUrl) {
console.log(pdfUrl);
}
}

When I am logging pdfData I am getting null value as response and in the network side I get the Dhtmlx-Error: Error: EACCES: permission denied, open ‘/data/exports/0000/2995940987’ error,

I am getting this error from today, before that It was working very good, I have exported in the pdf in the morning it was working,

Now the trick is when I am calling callback I am getting error but when I am directly exporting the pdf without callback it works fine,

Can someone help me out, if anyone else is also facing the same issue let’s solve it together.

Hello Parth,
When you export the data with the callback function, instead of the file, you get a download URL. If you use our online export server, the file is stored there for some time. When the server is restarted, these files are deleted.
I confirm that the export server was restarted today. So, you can no longer download the previously stored files.

Also, the export server was updated, and, for some reason, there is no way to store new files with the callback function. We are aware of the issue, and it will be fixed soon.

I will let you know when the issue is fixed.

Hello Parth,
The dev team fixed the issue for the PDF/PNG/Excel, and iCal files.
It is not so easy to fix that for the MSP and Primavera exports, and it doesn’t work even on the local export module.
But the issue will be fixed in the future.

Hello Ramil,
It’s working now, I am very glad with the support you guys are providing.
I have one more question, I am not able to exports the pdf with colors in the grid area, It’s showing in the gantt-chart but it’s not in the exported pdf, I tried using raw but using raw=true makes the export pdf have limit the amount of columns,

Can you suggest me some other way

Hello Parth,
Thank you for the positive feedback!

To export with the custom styles, you need to include them in the header parameter of the export function:
https://docs.dhtmlx.com/gantt/desktop__export.html#customstylefortheoutputfile

And if you have custom configuration, you also need to export in the raw mode:
https://docs.dhtmlx.com/gantt/desktop__export.html#exportingcustommarkupandstyles

Most likely, you encountered a bug when the timeline is not fully exported because of the custom layout configuration.
The dev team will fix the bug in the future, but I cannot give you any ETA.

There are 2 possible workarounds:
Add the style rule to extend the timeline only for the export module:
http://snippet.dhtmlx.com/5/7b1605226
http://snippet.dhtmlx.com/5/0821bda46

Use the autosize config to stretch the grid, then restore the previous width:
http://snippet.dhtmlx.com/5/343f8e2a6
https://snippet.dhtmlx.com/5/810d70012

I am providing this code in css file
.gantt_row.gantt_row_project {
background: #2ca8fa !important;
font-weight: bold;
}
and also importing the css file in the header, But I am not getting the background color in the exported pdf, I can see the UI in the created Gantt-chart but when I export pdf I get data without any background.

Please help me in solving this issue and without using raw = true.

Hello Parth,
I added the style rules you shared to the following snippet, and when I export the data, I see that the styles are applied:
https://snippet.dhtmlx.com/3m0z5uqj

It is hard to suggest what might be wrong as I don’t see your code.
Please add your configuration to the following snippet and make sure that the issue is reproduced there:

Then, click on the Save 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.

Thank You,

It was a very big help

I have a question, When we supply data in gantt.load() and after this what it does, as I am providing the duration value but it’s changing the duration value based on the start_date and end_date value, So Can you please suggest me a document where I can find the complete process after gantt.init()

Hello Parth,
If you load the data with all date parameters (start_date, end_date, and duration), the duration parameter is ignored as the end_date parameter has a higher priority.
https://docs.dhtmlx.com/gantt/desktop__loading.html#:~:text=The%20end_date%20has%20a%20higher%20priority%20than%20the%20duration%20parameter.%20If%20there%20are%203%20parameters%20specified%20in%20the%20task%20object%2C%20Gantt%20will%20ignore%20the%20duration%20parameter%20and%20the%20task%20will%20be%20loaded%20with%20a%20different%20duration%20value.%20For%20example%3A

It works the same way even after you load tasks: if you modify only the duration parameter via the Gantt API, the changes are not applied. So, you need to update the end_date parameter as well:

const task = gantt.getTask(2);
task.duration += 2;
task.end_date = gantt.calculateEndDate(task.start_date, task.duration);
gantt.updateTask(2);

There is no document that shows the complete process of what happens after the init method as it depends on the Gantt configuration.

If you want Gantt to specify the task duration not depending on the end_date parameter, you can return the task data from the server without the end_date parameter. In that case, Gantt will calculate the end_date parameter while loading the data.