Exporting Data to PDF Format in JavaScript Gantt Chart

PDF export in the JavaScript Gantt Chart control enables exporting project data to PDF documents for sharing or archiving, using the pdfExport method with allowPdfExport set to true and PdfExport module injected. This feature supports exporting timelines, tasks, and dependencies, with options for indicators via base64 images, blob objects for previews, single-page layouts, multiple Gantt instances in one file, and themes like Tailwind3 or Bootstrap. Focus on auto-scheduled tasks for accurate export, as manual scheduling is not currently supported.

Export basic Gantt data

Export Gantt data to PDF by setting allowPdfExport to true and calling pdfExport, which generates a document with the chart and tree-grid data.

Include indicators in PDF export

Include dynamic indicators and images in PDF export by defining them with base64 encoding in the data source, mapped to the taskFields.indicators property, enhancing visual representation of task status.

Export Gantt data as blob object

Export Gantt data as a blob object for previews or modifications by setting the fourth argument of pdfExport to true, with the blob returned in the pdfExportComplete event.

Single page exporting in Gantt

Export Gantt rows to a single PDF page by setting fitToWidthSettings.isFitToWidth to true in PdfExportProperties. Customize chart and grid widths using chartWidth and gridWidth as percentages.

Multiple Gantt exporting

Export multiple Gantt instances to a single PDF file by calling pdfExport on each, with each Gantt exported to a new page in the same document.

Apply themes in PDF export

Apply themes to exported PDF documents by setting the theme property in PdfExportProperties to values like Tailwind3, Fabric, Bootstrap, or Bootstrap4, customizing the appearance.

See also