Export to PDF - Questions

Hi - I’ve seen this question asked a few times, but unclear as to whether the answer has changed or there are work arounds.

Is there a way to achieve a paginated export? Currently I’m providing width/height in additional settings and this is somewhat achieving my purposes, however it can cause some tasks to be split or cut off poorly and the header and footer I supply aren’t duplicated on each page of the export - nor is the scale header.

Is there a workaround for any of these things?

  • The cut off tasks
  • The header/footer repeating
  • The scale not repeating for each page

Thanks for any help you can provide!

Hello,
By default, the Gantt chart is exported within one page regardless of the sizes.
It is possible to split it into multiple pages with the height parameter.

However, the PDF export is made by Electron.js, so there is no easy solution to control how it cuts the pages and move part of the content to the following page.

It is possible to display the scales on each page, but in that case, you won’t see some task rows:
http://snippet.dhtmlx.com/5/579ec1f3e

The situation with the custom footer and header should be the same: you can display it on each page, but it will hide some task rows.

Right now, there is no solution for that.

I remember that someone else experimented with the DOM structure:

And I made the following snippet basing on that approach, but the tasks are still cut in the middle:
https://snippet.dhtmlx.com/97xpacbv

Thanks ramil - this might be helpful for others in the future and would be great to add to the multi-page export section - exportToPDF Gantt Docs

  • Cannot control position of cut off becuase it’s only height*width and no per page adjustment (e.g. tasks may be cut off with page).
  • Cannot reduplicate scales without z-index css that causes it to overlay task rows.
  • Cannot reduplicate header and footer without z-index css that causes it to overlay task rows.

Hello,
Thank you for the suggestion. I will add a task for the technical writer to do that.