Command, File Operations, HowTo

How to Install and use wkhtmltopdf on CentOS 8

In this article we will discuss about how to install wkhtmltopdf on centos 8 and simple examples to use it.


Often we find ourselves in a position where we need quick pdf files for a document that is right now is on internet. There’s is no direct way to do it from browser unless you hit online tools that turns links into pdf for you.

But do we have to trust them with our documents/information? We don’t have to, we can setup wkhtmltopdf one time on our computer or personal server and use it every time we need to create pdfs from html pages or links that we need.

Installing wkhtmltopdf on CentOS 8

We will use command below to download and install wkhtmltopdf on our CentOS 8 server:

[root@server ~]# sudo yum install -y
Installing wkhtmltopdf command

After running above command, we can now check the installation with this command:

[root@server ~]# wkhtmltopdf --version
Check wkhtmltopdf version


Run this simple command to convert page to pdf file.

[root@server ~]# wkhtmltopdf --page-size A4 --quiet google.pdf

How to check wkhtmltopdf installtion path

[root@server ~]# which wkhtmltopdf

Leave a Reply

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