Monday, October 24, 2016

Convert HTML Pages into PDF in archlinux using HTML2PDF

wkhtmltopdf and wkhtmltoimage are open source (LGPLv3) command line tools to render HTML into PDF and various image formats using the Qt WebKit rendering engine. These run entirely "headless" and do not require a display or display service.

Installation in archlinux:
$sudo pacman -S wkhtmltopdf

Convert HTML to PDF
$wkhtmltopdf url.pdf

Convert HTML to Image
$wkhtmltoimage url.jpeg

GUI interface using HTML2PDF:
AUR Link:

$wget -c
$tar -xvzf html2pdf.tar.gz && cd html2pdf
$makepkg -s
$sudo pacman -U *.pkg.tar.xz

If you have problem downloading deb you can get deb here:
Then put with PKGBUILD

Here's the html2pdf GUI:

Sample results:

If the pages is longer, then the content will be split into several pages.

Ok that's it.

Share on Facebook
Share on Twitter
Share on Google+