You are right that I use custom style in the export header.
On the screen, the following style is on:
“.gantt_task_content{ padding-left: 3px;padding-right: 3px; color:#222; overflow: visible; direction: ltr;”
But when it is rendered as in .png export, I would get empty space to the right (as shown above)
If I remove ‘overflow: visible; direction: ltr;’ in the export header style,
The empty space is removed ( this is what I would expect) but then it would clip the text as seen below - see the following picture:
In a nutshell, ‘overflow: visible; direction: ltr’ is applied without problem on screen, but this causes empty space in exporting - it doesn’t translate this particular style 100% when in export.
Coding snippet:
A) on Screen: … No problem here.
$('#mutable-stylesheet').empty().text('.gantt_task_content{ color:#222; overflow: visible; direction: ltr;}');
B.1) on Export - with empty space … Problem!
…
headerStyleALL = ‘.gantt_task_content{ padding-left: 3px;padding-right: 3px; color:#222; overflow: visible; direction: ltr;} ’;
header = headerStyleALL;
…
gantt.exportToPNG({
name: ‘GLUE_Export_’ + timestamp + ‘.’ + exportType,
server: server,
raw: true,
orientation:“portrait”,
locale: locale,
header: header
});
B.2) on Export - with clipped text - problem!
headerStyleALL = ‘.gantt_task_content{ padding-left: 3px;padding-right: 3px; color:#222;} ’;
The rest is the same as above.
So B.1 and B.2 result in problem although the name of the problem differs.
Very puzzling…
Any idea?
Many thanks,
Sun