YetiForceCompany / YetiForceCRM

Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
https://yetiforce.com
Other
1.73k stars 749 forks source link

[Question] Can Gantt Chart be Printed or exported to PDF? #10141

Closed salloubani closed 5 years ago

salloubani commented 5 years ago

Hi All,

is there an option to print or export Gantt Charts on version 5.1 SP1? any workarounds?

neuronetio commented 5 years ago

PDF files are generated from php (back-end), and gantt is generated in the front-end. PHP does not have server-side rendering (like nodejs) without JavaScript extension, so exporting PDF files from selected records is not possible (maybe in the future there will be such option)

For now, exporting the gantt view to the image can only be accessed from the gantt view in the browser - this feature is not yet implemented, but it is easy to implement and I think it will be implemented in the near future.

For now, you can workaround this problem by creating a custom file replacement Gantt.js . You must add an action to the toolbar in the registerHeaderActions (by adding a button to the header) which will execute the dump usingapp.htmlToImage method to get a gantt as an image. When you have an image you could force browser to download it.

There is also PDF.js library if you want to create PDF from browser in javascript.