Html to Image Conversion via Wkhtmltopdf

 Wkhtmltopdf can be used in order to convert HTML sites to images or PDFs. CutyCapt seems to be a similar tool.

Note that during my usage of this tool the resulting png files were of massive size compared to its actual content. One may consider to compress the results. In my case Wkhtmltopdf stored an image of the size of 9609 x 6300 pixels in an 231.3MiB file. I simply opened the file with Gimp and stored this image on another file using the same format. The resulting file used 8.5 MiB of disk storage. This can be a significant difference if such a file needs to be uploaded.

As stated here one can set the width and height px values of the body's css attribute. This causes the site in question to be rendered by wkhtmltopdf in the desired resolution. If the page does not fill the display completely one might have to set the width and height px values of some children of the body element as well.

Alternatively, one can set the font size px value of the body's css attribute. This scales the image according to the smallest used font-size. Additionally, one can use the Wkhtmltopdf's --minimum-font-size * option in order to further scale the output image. This method can be used in order to ensure a minimal resolution of the smallest used text that is present on the output.