We’ve migrated our app over to using CSS properties, however it appears that the PDF export service doesn’t support these. Is there any way of getting this to work? I’ve tried using them on their own
Hello,
Unfortunately, there is no way to include the javascript code in the export function so that it is executed on the export server, and CSS variables aren’t supported yet. The dev team will add that functionality in the future, but I cannot give you any ETA.
However, you can try converting the styles on your current page and include them inside the style element that is inside the header property:
var styles = document.getElementById("styles").innerHTML;
var styles_converted = document.querySelectorAll("style[data-cssvars='out']")[0].innerHTML
gantt.exportToPDF({
raw:true,
header: "<style>" + styles + styles_converted + "</style>"
});
Hello,
The dev team fixed the bug with the CSS variables and modern style rules that were not working with the export server: https://snippet.dhtmlx.com/5/af17d3149
Get a guaranteed answer from DHTMLX technical support team
under the most suitable support plan