PDF Export Margins and Page Size Issue in dhtmlxGantt (v6.2.7)

We are using dhtmlx-gantt version 6.2.7 in our project and have encountered some unusual behavior with the PDF export functionality.

When exporting the Gantt chart to a PDF, and subsequently printing the file, the page size and margins seem unusual. Specifically, it appears that the export is defaulting to a paper size of 11.7 x 16.5 inches (approximately A3), which is larger than expected for standard printing. This has led to formatting and margin issues when printing the PDF, particularly when using regular-sized paper formats like Letter or A4.

Could you please advise on the following:

  1. Is there a way to customize or adjust the default page size and margins in the PDF export?
  2. Are there any specific configurations or properties we can modify to better control the output for standard paper sizes?
  3. Are there known limitations or recommendations for printing the exported PDFs from the Gantt chart?

any guidance you can provide on resolving this would be greatly appreciated.

Hello,

Is there a way to customize or adjust the default page size and margins in the PDF export?Are there any specific configurations or properties we can modify to better control the output for standard paper sizes?

You can specify the sizes or the format of the Gantt chart in the additional_settings parameter:
https://docs.dhtmlx.com/gan… ;

Also, you can customize the printing file with paddings or margins. Please check the example:

DHTMLX Snippet Tool ;

Are there known limitations or recommendations for printing the exported PDFs from the Gantt chart?

You can check out the limitations of the online export server in the following article:
Export to PDF and PNG Gantt Docs ;

If you have a large chart or want to export the data that takes more time to render, you need to use the standalone export module: