in reply to html to jpeg

Depending on your requirements, you could also "print" the page to PDF, for example automating the process with X11::GUITest (or Win32::GUITest on windows). Here's an example: 945042 on automating browser interaction.

If you choose to do it via screenshots, as long as the browser window stays the same size, it's trivial to remove the browser borders from the images via something like Image::Magick

"I know what i'm doing! Look, what could possibly go wrong? All i have to pull this lever like so, and then press this button here like ArghhhhhaaAaAAAaaagraaaAAaa!!!"