Print reports by wkhtmltopdf
Why do in need wkhtmltopdf package?
In odoo, whenever you create a report, it created as html format page. After that, if you need to download it on pdf format, you need to have wkhtmltopdf package to to this conversion.
How to make sure if it is installed or not?
To check if you have wkhtmltopdf installed or not you need to login as system administrator and open the settings.
- Open system settings tab
- Find the Companies section
- under Document Layout, click on Preview Document
- If it prints a sample page, it means you had done the required setup before.
- If you have received an alert popup which it says something like: "You need to install Wkhtmltopdf", it means that you need to follow the installation instruction.
Installation of WKHTMLTOPDF
apt-get install wkhtmltopdf
In linux debian or ubunu you can use this command to install the package. It is ease to deploy.
You can find more information about it in pypi.org website on link below:
Using the dpkg command:
In case you are using persian language, the only package witch is working properly is this method of installation.1- Download the latest version of wkhtmltopdf package based on your os platform.
- Open the website: https://wkhtmltopdf.org/downloads.html
- Find out which package is the best.
- Copy link address
- Download it:
wget -i https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.bullseye_amd64.deb2- Install the package.
dpkg -i wkhtmltox_0.12.6.1-2.bullseye_amd64.debNote: In case you get some errors about libssl missing, you need to install it first: wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.0g-2ubuntu4_amd64.deb sudo dpkg -i libssl1.1_1.1.0g-2ubuntu4_amd64.deb
After that you need to fix the failed installation:
sudo apt install -f
3- Copy installation files:
sudo ln -s /usr/local/bin/wkhtmltopdf /usr/bin
sudo ln -s /usr/local/bin/wkhtmltoimage /usr/bin4- Restart your odoo service.
systemctl restart odoo
Views | |
---|---|
1 | Total Views |
1 | Members Views |
0 | Public Views |
Actions | |
---|---|
0 | Likes |
0 | Dislikes |
0 | Comments |
Share by mail
Please login to share this webpage by email.