Converting html
Posted: 2014-09-19 Filed under: misc, office | Tags: convert, html, pdf, png Leave a commentI need to convert a simple webpage to PDF and picture format. Usually, I would just take a screenshot, however it is too big. I searched and I found a nice little tool, called wkhtmltopdf. It can be easily installed from SBo. To convert a webpage to PDF, using default settings, is extremely easy. Just do the following in the terminal:
wkhtmltopdf example.html example.pdf
I was pleasantly surpised to find an additional program in the package, called wkhtmltoimage
. It does what the name suggests — converts your html file to an image. Its use is also very easy:
wkhtmltoimage --format png --quality 100 example.html example.png
The above command will convert the html
file to png
, with high quality (100). Very nice!