You need html2ps and convert from ImageMagick package:
html2ps index.html index.ps convert index.ps index.png
The second program creates one png per page for a long html page - the page layout was executed by html2ps.
I found the evince-thumbnailer program reported as:
apropos postscript | grep -i png evince-thumbnailer (1) - create png thumbnails from PostScript and PDF documents
but it did not work on a simple, first test.
If you like to combine several pages with a large image, the converter will help you.
Now I see that the converter works directly with html, so
convert index.html index.png
will work too. I see no difference in output, and the size of the images is almost identical.
If you have a multi-user type of email, you usually have a mail header, maybe some pre-html text, html and possibly attachments.
You can extract the html and format it separately, but making it inline may not be that simple.
Here is the file that I tested, which was from April 14, so I extract one letter from the mail folder:
sed -n "/From - Sat Apr 14/,/From -/p" /home/stefan/.mozilla-thunderbird/k2jbztqu.default/Mail/Local\ Folders-1/Archives.sbd/sample | \ sed -n '/<html>/,/<\/html>/p' | wkhtmltopdf - - > sample.pdf
then I only extract the html part of this.
wkhtmltopdf is required - -
to read stdin / writing in stdout. PDF rendering, but I donβt know how to integrate it into the workflow.
You can replace wkhtml ...
with
convert - sample.jpg