Take a full page screenshot with Firefox on the command-line

I’m running Firefox on a Xvfb in a VPS. What I want to do is to take a full page screenshot of the page.

I can redirect Firefox to particular page using

firefox http://google.com

and take a screenshot (inside X) using ImageMagick

import root -window output.jpg

The problem is, most of the page need scrolling and I can’t know the height beforehand.

The other way is to pick a very big height (like 4000px) and then process the image and remove the useless part. But that’s unnecessary processing.

I found many Firefox add-ons, but I’m looking for a solution that can be programmed using the Shell Command line.

Edit: I ended up writing my own FireFox extension for doing this.

6 Answers
6

Leave a Comment