HTML -> PDF Report with Charts

Hi Team!

Is it possible to use third party libraries in with my Html report template when generating PDF? I have tried https://www.chartjs.org/ when I generate an HTML report the chart shows up but when I try PDF the chart does not show up. What alternative do you suggest?

Thank you,
George

1 Like

any ideas?

Hi George,
Unfortunately, HTML to PDF transformation that uses Flyingsaucer library doesn’t take into account Java Script execution. So third party JS libraries don’t work with HTML to PDF transformation.
See StackOverflow link: java - Use javascript in PDF using flyingsaucer - Stack Overflow

I guess there is no alternative because Java can’t execute JavaScript code.

1 Like

Thank you! I will look into other options.