snapshot from browser with flash or javascript

白昼怎懂夜的黑 提交于 2019-12-25 03:39:36

问题


I saw a thread here suggesting using a HPA to take a browser screenshot, but I was wondering if you could help me. I would like to be able to select a part of a piece of a web page and render it as an image. I know flex can take images of its own canvas, but is it possible to take a picture of the rest of the page?

I would like to be able to do it with just flash and javascript, and without a plugin. I realise that I may be asking for magic, so thanks for your help.


回答1:


If Flex can do it, then Flash should also be able to do it.

Doing it client side is if nothing else, rather unreliable. Personally I would go for either an external service like http://snapcasa.com/ or if you have access to your server go for a server side solution like http://khtml2png.sourceforge.net/




回答2:


I would say, for security reasons, it would be impossible for you to take a snapshot of the browser itself.

But, you should be able to read the HTML, and then use the Browser component in Flash to display that HTML, then take a screenshot of that. I don't think it'd be as easy as that, but take a look at this post for as a start: Flex.html



来源:https://stackoverflow.com/questions/1462461/snapshot-from-browser-with-flash-or-javascript

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