Search code examples
perlscreenshot

How can I take a screenshot of website with Perl?


Possible Duplicate:
How can I take screenshots with Perl?

How can I take a screenshot from a site (in batch mode) using Perl? I.e. solution should produce image file (say .png) given an URL. It would be nice, if no X Window system will be required for solution to work.


Solution

  • I'd use WWW::Mechanize::Firefox. Unfortunately it does need X (at least on non-OS X *NIX), but you can use xvfb to run it headless.