Problem: ERPNext v14.10.0 (version-14) installed on Ubuntu server. When PDF files are generated the images in header are not shown.
Cause: Frappe framework uses a library called wkhtmltopdf to generate PDF files. If this library is not installed or if an incorrect version of this library is installed then the images in header may not be included in PDFs generated.
Solution: Install “wkhtmltopdf 0.12.6 (with patched qt)”
Steps to install “wkhtmltopdf”
Open terminal and run below commands
wkhtmltopdf --version
The above command will show the current version of wkhtmltopdf if it is already installed.
sudo apt-get remove wkhtmltopdf
Run above command to uninstall the current version of wkhtmltopdf
sudo apt-get install -y xfonts-75dpi
sudo apt-get -y install libssl1.1
sudo wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb
sudo apt install ./wkhtmltox_0.12.6-1.focal_amd64.deb
sudo cp /usr/local/bin/wkhtmlto* /usr/bin/
sudo chmod a+x /usr/bin/wk*
Finally run below command to check if wkhtmltopdf is installed.
wkhtmltopdf --version
You should see below response.
wkhtmltopdf 0.12.6 (with patched qt)
Now generate PDF and you should see images.