highcharts display in my render html page which i want to convert into PDF using wkhtmltopdf in rails

[亡魂溺海] 提交于 2019-12-06 07:37:36

I am not familiar w/wkhtmltopdf but I do use wkhtmltoimage to create images of pages that contain graphs from highcharts. One thing I noticed is that I had to set --javascript-delay to be several seconds long to make sure the chart had enough time to load. It seems as though wkhtmltopdf does support this option (wkhtmltopdf v0.10.0_rc2 docs). Can you see if that helps?

Here is how we call it w/a javascript delay of 3 seconds:

/bin/wkhtmltoimage --javascript-delay 3000 "http://example.com/chartPage" "/path/to/image.png"
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!