Install:
apt-get install python-qt4 libqt4-webkit
git clone git://github.com/adamn/python-webkit2png.git
cd python-webkit2png/
python setup.py install
Test:
./webkit2png.py www.google.com
You might get this error:
webkit2png.py: cannot connect to X server
Fix:
# install xvbf
apt-get install xvfb xbase-clients xfonts-base libgtk2.0-0
# start
Xvfb :99 -ac
See details here
Take a screenshot:
./webkit2png.py -o obama.png -x 1024 768 "http://obama.com"
On OSX I would recommend you use Paparazzi