将 Flash 图表转换为图像/pdf
需要帮助找出一个可以将 flash (.swf) 图表转换为任何图像格式以便稍后嵌入到 pdf 报告中的工具。我使用 Ruby on Rails 作为开发平台。 我使用了 swftools 中的工具(特别是 swfextract 程序),但它不适合我的用例,因为它提取单个元素(形状、影片剪辑、框架等),这不太有用。
此外,如果有人也能在概念层面的逻辑上指导我,那将非常有用,这样如果没有工具适合我的要求,我就可以编写自己的程序,
谢谢!
Need help in figuring out a tool which can convert a flash (.swf) chart to any image format to be later embedded to a pdf report. I am using Ruby on Rails as the dev platform.
I have used tools from swftools (specifically the swfextract program) but it doesn't suit my use case as it extracts individual elements (shapes, movieclips, frames etc) which is not too useful.
In addition, it would be very useful if someone can guide me on the conceptual level logic too, so that if no tool fits my bill I can write my own program
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我会研究 Adobe 的 as3corelib。
as3corelib
它们包含一个用于直接从任何 DisplayObject 创建/压缩 PNG 和 JPG 图像的库。因此,本质上您将在 Flash 中绘制图表,并启动一个函数来抓取您的图表,将其保存为 JPG / PNG 并将其作为 POST 变量发送到服务器端脚本。列出了您要查看的类 此处
如果您无法弄清楚如何使其正常工作,请告诉我。我有一个为使用多部分/表单数据内容类型发布帖子而编写的帮助程序类。这就是你的编码行可能看起来的样子
超级简单!谢谢阿多比!
I would look into as3corelib from Adobe.
as3corelib
They include a library for creating / compressing PNG and JPG images directly from any DisplayObject. So, essentially you would draw your chart in flash, and initiate a function that would grab your chart, save it as a JPG / PNG and send it as a POST variable to a server side script. The classes you want to look at are listed here
If you are unable to figure out how to get this working, let me know. I have a helper class I wrote for doing a post with multipart/form-data content types. Here is what your encoding line might look like
Super easy! Thanks Adobe!