awsodoo

Install the Wkhtmltopdf extension

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

  • Download the latest version of the package from the Wkhtmltopdf project releases page and install it. Replace the X.Y.Z placeholders with the latest version available for your platform.

    NOTE: The latest version available of Wkhtmltopdf is not compatible with some Odoo functionalities in some Linux distributions. Please check what is the recommended version for your Linux distribution in the Odoo GitHub repository.

    $ wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/X.Y.Z/wkhtmltox-X.Y.Z_linux-generic-amd64.tar.xz
    $ tar -xvf wkhtmltox-X.Y.Z_linux-generic-amd64.tar.xz
    
  • Copy the binaries to the /usr/bin directory:

    $ sudo cp ./wkhtmltox/bin/wkhtmltoimage /usr/bin/
    $ sudo cp ./wkhtmltox/bin/wkhtmltopdf /usr/bin/
    
  • 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
      
  • Restart all running servers:

    $ sudo /opt/bitnami/ctlscript.sh restart
    $ sudo /opt/bitnami/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
Last modification December 21, 2018