I think what you are looking for is a utility which enables you to save a complete page opened in your browser into a png file. Most probably you are looking for a utility like commandlineprint2.
After installing the extension, you just need to type the command:
firefox -print http://google.com -printfile ~/foo.png