How do you safely convert an Ext JS 4 Chart to an image?

别来无恙 提交于 2019-12-11 18:18:59

问题


Just wondering if anyone knows how you would obtain an image from an Ext JS Chart in a secure manner?

I noticed that the Ext JS 4.1 preview has a "save" method that allows you to get a .png image from a chart but looking at the source code it seems to just sends the definition of the svg/vml from your chart to a Sencha server which is not secure enough for what I need.


回答1:


I had to do this before 4.1 so I never used the Sencha server conversion. ImageMagick didn't have a conversion for html to image but wkhtmltoimage worked great on my own server side.

The charts have to be in their own distinct page and wkhtmltoimage will convert it to whatever format you need.



来源:https://stackoverflow.com/questions/8802560/how-do-you-safely-convert-an-ext-js-4-chart-to-an-image

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!