I want to create Google Charts at server-end. I found some plugins like - GWT Tutorial, but I did not find it helpful because we need client-side interaction here. I need something using which I can create charts at server end so that I can store these charts images without requiring user to interact. I also found one more plugin - Charts4j, but I did not find any helpful examples or tutorial for this plugin.
Update-
Using Thymeleaf, I was able to load the HTML file to backend and was able to convert the HTML as PDF using HTMLToPDF plugin. The HTML is working beautifully fine. The PDF is getting generated. Now only issue left is that the javascript from HTML is not getting evaluated. Any solution for this?
Another Update -
When I find a solution I find another obstacle. I was able to execute the script using ScripEngine, but ScriptEngine did not find document. Then I used Java Jsoup's Document, sent the object to ScriptEngine, but again Jsoup's Document has different methods than Javascript's document.
I found a solution. I solved my issue using
Thymeleaf,SeleniumandIText HTML2PDF. I followed given steps -I added below dependencies to my POM -
Then, I resolved my HTML template containing javascript using ThymeleafResolver -
And in my code I used -
This resolved my HTML. Now, about javascript, I referred this - Evaludate JS, and my issue was resolved.
Thank you.