Install Wkhtmltopdf (HTML Page To PDF Converter) in RHEL, CentOS, Fedora

If You Appreciate What We Do Here On TecMint, You Should Consider:

  1. Stay Connected to: Twitter | Facebook | Google Plus
  2. Subscribe to our email updates: Sign Up Now
  3. Use our Linode referral link if you plan to buy VPS (it starts at only $10/month).
  4. Support us via PayPal donate - Make a Donation
  5. Support us by purchasing our premium books in PDF format.
  6. Support us by taking our online Linux courses

We are thankful for your never ending support.

Ravi Saive

I am Ravi Saive, creator of TecMint. A Computer Geek and Linux Guru who loves to share tricks and tips on Internet. Most Of My Servers runs on Open Source Platform called Linux. Follow Me: Twitter, Facebook and Google+

Your name can also be listed here. Got a tip? Submit it here to become an TecMint author.

Receive Your Free Complimentary eBook NOW! -

Download Free Linux eBooks

Linux BASH Programming Cookbook
Getting Started with Ubuntu 16.04
A Newbie's Getting Started Guide to Linux
Introduction to Linux - A Hands on Guide

You may also like...

28 Responses

  1. Ananda Bhattacharjee says:

    wkhtmltopdf google.pdf
    bash: wkhtmltopdf: command not found

    /usr/local/bin/wkhtmltopdf google.pdf
    Loading pages (1/6)
    Counting pages (2/6)
    Resolving links (4/6)
    Loading headers and footers (5/6)
    Printing pages (6/6)
    Please suggest me what to do now ?

  2. Jonus Joseph says:

    Hi Ravi,

    I am getting below error while trying this command. please check and advice me.

    [root@localhost tmp]$ wkhtmltopdf “\&ei=7n1LVeKNOMPCuAGDjoGACw\&gws_rd=ssl” /tmp/test/web/
    Loading pages (1/6)
    QPainter::begin(): Returned false============================] 100%
    Error: Unable to write to destination
    [root@localhost tmp]$


  3. Eddy says:


    Do we need to add crontab by using root username or nagios username?

  4. eddy says:


    Good article.

    I use this command to create
    wkhtmltopdf –username nagiosadmin –password XXXX “” /usr/local/nagios/report_daily/nagios_daily.pdf

    1. I want run this automatically by using crontab. How do i do it?
    2. I want to add this file at my nagios side.php. How?

    Thank you

    • Ravi Saive says:

      Just add the same command in the crontab file..

      • eddy says:


        Thanks for the reply. Here what ii create at crontab. Please correct me if im wrong.

        56 9 * * * wkhtmltopdf -username nagiosadmin -password XXXX “” /usr/local/nagios/report_daily/nagios_daily.pdf

        From the crontab, i wish to get report at 9.56am everyday. i’m i correct?

        • Ravi Saive says:

          The cron entry is correct, but just you need to add correct path like ‘/usr/bin/wkhtmltopdf’ in the cron entry..

          • Eddy says:

            @Ravi and all,

            I got error (from /var/mail/root)

            From Wed Mar 11 16:49:02 2015
            X-Original-To: root
            Received: by ubuntu-ea (Postfix, from userid 0)
            id 18E07396D; Wed, 11 Mar 2015 16:49:01 +0800 (MYT)
            From: (Cron Daemon)
            Subject: Cron wkhtmltopdf -username nagiosadmin -password XXX “http://X.X.X.X/nagios/cgi-bin/status.cgi?servicegroup=HC&style=detail” /usr/local/nagios/report_daily/nagios_daily.pdf
            Content-Type: text/plain; charset=ANSI_X3.4-1968
            Date: Wed, 11 Mar 2015 16:49:01 +0800 (MYT)

            Unknown switch -u

            Please help

          • Ravi Saive says:

            Please use the following command in cron file.

            /usr/bin/wkhtmltopdf -username nagiosadmin -password XXX “http://X.X.X.X/nagios/cgi-bin/status.cgi?servicegroup=HC&style=detail” /usr/local/nagios/report_daily/nagios_daily.pdf

Got something to say? Join the discussion.

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

Join Over 300K+ Linux Users
  1. 177,942
  2. 8,310
  3. 37,548

Are you subscribed?