nativeInstallererpnext

Install the Wkhtmltopdf extension

Before running the commands shown on this page, you should load the Bitnami stack environment by executing the installdir/use_APPNAME script (Linux and MacOS) or by clicking the shortcut in the Start Menu under “Start -> Bitnami APPNAME Stack -> Application console” (Windows). On OS X VMs, the installation directory is /opt/bitnami and OS X VM users can click the “Open Terminal” button to run commands. Learn more about the Bitnami stack environment and about OS X VMs.

To install Wkhtmltopdf on your system, follow the steps described below.

Linux and OS X

  • Execute the following command:

    $ find /opt/bitnami/common/bin -name fc-* | sudo xargs -I {} mv {} {}.bak
    
  • Install the necessary dependencies:

    • Debian:

      $ sudo apt-get install zlib1g fontconfig libxrender1 libfreetype6 libxext6 libx11-6
      
    • CentOS:

      $ sudo yum install zlib-devel fontconfig libXext libXrender freetype freetype-devel libX11-devel
      
  • Download the latest version of the package from the Wkhtmltopdf project releases page and install it. Replace the X.Y.Z and PLATFORM placeholders with the correct version and platform strings from the release filename.

    • Debian:

      $ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/X.Y.Z/wkhtmltox_X.Y.Z.PLATFORM.deb
      $ sudo apt install -f ./wkhtmltox_X.Y.Z.PLATFORM.deb
      
    • CentOS:

      $ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/X.Y.Z/wkhtmltox_X.Y.Z.PLATFORM.rpm
      $ sudo rpm -ivh wkhtmltox_X.Y.Z.PLATFORM.deb
      
  • Restart all running servers:

    $ sudo installdir/ctlscript.sh restart
    $ sudo installdir/ctlscript.sh restart apache
    

PDF options will now be available in your application.

Troubleshooting

If you experience issues with display resolution on Linux platforms, they could be related to the xfonts-75dpi or xfonts-100dpi packages. Uninstall them by executing:

$ sudo dpkg --remove --force-depends xfonts-75dpi
$ sudo dpkg --remove --force-depends xfonts-100dpi

Windows

  • Download the latest version of the package from the Wkhtmltopdf project releases page.
  • Uncompress the downloaded archive and add the wkhtmltox\bin directory to your system path.
  • Restart all running servers.

PDF options will now be available in your application.

Last modification June 25, 2020