Gantt Export to PDF does not render layers


I’m working with the gantt control try to put some task and layers and print them but I had not luck on rendering the layers on the exported pdf, the task exist but the layers not, any clue why I’m missing?

Example here: DHTMLX Snippets
And should look like this:

Hello Ruben,
You are trying to include the HTML element instead of its contents:

To make it work, you need to obtain the contents of the style element:

'<style>'+ document.getElementById('styles').innerHTML +'</style>'

Here is the updated snippet: