wants to convert web page into PDF by entering website URL. Definitely your first answer is, He can use Traditional method (by right clicking on webpage and clicking on “print” option) to create PDF of website page. He has hundreds of webpages to convert into PDF. So, He is searching for something that he can easily convert website page into PDF in bulk.

It would be better If there any utility which converts HTML to PDF by entering just one command. wkhtmltopdf tool converts html to PDF or IMAGES such as JPEG, PNG etc.. wkhtmltopdf is lightweight open source tool for converting html to PDF or Image such as JPG, PNG etc. wkhtmltopdf is written in C++ programming language. wkhtmltopdf can convert any HTML web page to PDF with Options to add Header and Footer. It is available under GNU/GPL license. Checkout Official site of wkhtmltopdf for latest changelog.

wkhtmltopdf is supported in all the well known operating system such as Windows, Linux and Mac etc. So, How to install wkhtmltopdf in Linux base system?

Install wkhtmltopdf in Windows

Download wkhtmltopdf’s executable setup from official site. It’s available for both 32 and 64 bit system. Now, Install wkhtmltopdf by running setup.

Install wkhtmltopdf In Linux

It is available for both versions of system (32 and 64 bit Linux systems). We will install wkhtmltopdf from command line, which is a non-graphical way to interact with your computer. You need root access to install wkhtmltopdf in linux.

So, Let’s open terminal by hitting ctrl+alt+t. Now, run sudo -i command to login with root user. You can also use su - <User> where <User> is root user name. Enter root password to login.

Run below command to install wkhtmltopdf in your system.

apt-get install wkhtmltopdf

Convert HTML To PDF

Now, create test PDF by enter below command in linux terminal.

wkhtmltopdf <Website URL> <Output File Name>


<Website URL> is website URL which you want to convert to PDF.

<Output File Name> is filename with path where you want to save output.

Ex, wkhtmltopdf /home/user/output.pdf

Above command will create PDF file of site at /home/user/output.pdf.

In windows system open command prompt and run above command to comvert HTML to PDF.

Ex, wkhtmltopdf C:/output.pdf


Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">