Html to PDF

Wkhtmltopdf is an interesting and excellent tool which uses the updated QT 4.4 WebKit engine to produce high quality of PDF-documents. This tool is also very useful for the Linux users who does not have X-windows install and want to convert any online tutorials/helps/html pages or even websites as snap-shots.

Installing Wkhtmltopdf

Unfortunately no rpm builded so far it seems but you can just download the pre-compiled binary tar from the download url ( Ssh your server as root(select the exact source matched your hardware arch).

Wkhtmltopdf Examples

Convert website/url to PDF file

  • # wkhtmltopdf <url> <filename>
    # wkhtmltopdf gnutoolbox.pdf
    # wkhtmltopdf Wkhtmltopdf.pdf

To convert .html files to .ps

  • wkhtmltopdf my.html

To convert a local HTML file to PDF

  • wkhtmltopdf my.html my.pdf

Useful Links :

wkhtmltopdf home page

wkhtmltopdf Help Docs