PDF Print issue in version 12

Hi

I am using version 12.10.1., problem is my PDF generation of documents are broken i.e. the layout is not correct, I have gone throughthis topic to fix this but it stops my system.

In the topic it says to add the host_name to site_config.json but when I add that my erp stop working and says “Internal Server Error” when I remove host_name parameter the page starts working but the pdf error still exists.

Any suggestion?

Which version of wkhtmltopdf are you running?

Hi

its wkhtmltopdf 0.12.3 (with patched qt)

You should update to 0.12.5 or higher.

For ubuntu…

#A few parameters and file locations are conditional to the OS release number, so let's get that now
ubuntuRELEASE=$(lsb_release --release --short | cut -d. -f1); printf "$ubuntuRELEASE\n"
# cat /etc/lsb-release | grep "RELEASE" | cut -d= -f2;          # cat /etc/os-release | grep "VERSION_ID" | cut -d= -f2 | sed s/\"//g;
#If the first one doesn't work, you could try these alternatives

# wkhtmltopdf        #apt install wkhtmltopdf -y #[NB! default install uses an "old" ~0.12.3 version which is not good]
sudo apt install -y libfontconfig fontconfig xvfb libxrender1 xfonts-base xfonts-75dpi; #required libraries
# wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.trusty_amd64.deb && sudo dpkg --install wkhtmltox_0.12.5-1.trusty_amd64.deb;
[[ $ubuntuRELEASE -eq 16 ]] && wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.xenial_amd64.deb;
[[ $ubuntuRELEASE -eq 18 ]] && wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb;
[[ $ubuntuRELEASE -eq 20 ]] && wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.focal_amd64.deb;
[ -f $(ls ./wkhtmltox_0.12.*.deb) ] && sudo dpkg --install wkhtmltox_0.12.*_amd64.deb; 
wkhtmltopdf --version  #Test the install: wkhtmltopdf 0.12.6 (with patched qt)

or for debian…

#wkhtmltopdf        #NB! apt install wkhtmltopdf -y #[installs an "old" version which is not good]
sudo apt install -y libfontconfig fontconfig xvfb libxrender1 xfonts-base xfonts-75dpi; #required libraries
#wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.stretch_amd64.deb && sudo dpkg --install wkhtmltox_0.12.5-1.stretch_amd64.deb
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.buster_amd64.deb && sudo dpkg --install wkhtmltox_0.12.6-1.buster_amd64.deb;
wkhtmltopdf --version  #Test the install: wkhtmltopdf 0.12.6 (with patched qt)

Hi @trentmu

Followed your instruction and now my wkhtmltopdf version is 0.12.6 (with patched qt), still I am facing the same issue.

Any guess?

Maybe check out all your log files. You may just have something simple like a misconfigured permissions error somewhere