Export to PDF in Vue


#1

Hi,
I’m trying to export my gantt to PDF/PNG.
Generally it works, but it does not show my custom templates etc.
Original gantt:


And this is how exported version looks like:
gantt_27.pdf (51.0 KB)


#2

Hello Wolland,
If you export with custom styles, the export server is not aware of them. You need to include them in the header or footer parameters:
https://docs.dhtmlx.com/gantt/desktop__export.html#customstylefortheoutputfile
Here are examples of how it can be done:
http://snippet.dhtmlx.com/5/b7ef7c6bc
http://snippet.dhtmlx.com/5/9288a27ec


#3

Hi,
In my case I don’t use custom styles but templates for some of the columns.
Icons is font awesomeicon, should I include font awesome css files in header as well ?


#4

Hello Wolland,
Yes, you need to include these files in the header or footer parameters.
If you include them as links, they should be accessible for the export server.
To export with the templates, you need to enable the raw: true parameter:
https://docs.dhtmlx.com/gantt/desktop__export.html#exportingcustommarkupandstyles


#5

OK.
Thanks for your help.