-2

I'm trying to capture a part of web page as image, programmatically, i.e., using Javascript or JQuery. I have tried with html2canvas, but it is not working when I have swf objects and iframes.

My web page may contain swf file(Fusion charts), iframes, text, and images. I'm trying to convert all the objects into a single image. Does anyone know a possible solution, that works also on IE9?

Rubens
  • 14,478
  • 11
  • 63
  • 92
Lavss
  • 9
  • 2
  • 3
    You can't do that. flash is not part of html, javascript has no way to capture that. – chris-l Aug 01 '13 at 07:09
  • 1
    Have a look at this question: http://stackoverflow.com/questions/968201/convert-web-page-to-image – Pavlo Aug 01 '13 at 07:29

1 Answers1

2

Setup a virtual machine which reads a list of websites to capture

wget ...

every now and then

/etc/crontab

let it open an url

firefox http://....

and then take a screenshot from a second shell

import -window root /home/ftp/screenshots_<id>.jpg

then close firefox instance / shell and loop that for all your urls

This can all be put into 1 shell script and loaded into a very small virtual box, use awesome-wm or some tiny window manager. Also import needs imagemagick.

This is the only way you can capture html and flash and iframes like rendered by the browser in an hidden automatic process.

Daniel W.
  • 31,164
  • 13
  • 93
  • 151