如何安全地将Ext JS 4图表转换为图像? [英] How do you safely convert an Ext JS 4 Chart to an image?

查看:117
本文介绍了如何安全地将Ext JS 4图表转换为图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是想知道是否有人知道如何以安全的方式从Ext JS图表中获取图像?

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

我注意到Ext JS 4.1预览有一个保存方法,允许您从图表中获取.png图像,但看着源代码,它似乎只是将svg / vml的定义从您的图表发送到Sencha服务器,它不够安全,足以满足我的需要。

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.

推荐答案

我必须在4.1之前这样做,所以我从来没有使用Sencha服务器转换。 ImageMagick没有html到图像的转换,但是wkhtmltoimage在我自己的服务器端工作得很好。

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.

图表必须在自己的不同页面和 wkhtmltoimage 会将其转换为您需要的任何格式。

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

这篇关于如何安全地将Ext JS 4图表转换为图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆