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.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…