When my app runs (or when I run from commandline) the wkhtmltopdf command I get the following error: (showing it from command line)
#> wkhtmltopdf
wkhtmltopd
Note that there is an executable version of wkhtmltopdf distributed in a UPX compressed format, ldd and file will both report that this file is statically linked even though the payload requires shared libraries.
To check try
strings | fgrep UPX
If you see any "UPX" id strings then install upx and use "upx -d" on a copy of the file (as upx works in place) and then run ldd on the uncompressed file.
Ran into this today on a RHEL7 machine running the static version of wkhtmltopdf. Solution was to install a few dependencies:
yum install libXrender libXext fontconfig
I need also do after:
sudo apt-get install libfontconfig1
sudo apt-get install xvfb
to install the dependency package.
Update the node-modules wkhtmltopdf index.js
wkhtmltopdf.command = 'wkhtmltopdf'; to 'wkhtmltopdf.command = 'xvfb-run wkhtmltopdf';'
I was having the exact same problem! The solution, to me, was to install the 64bit version of wkhtmltoimage.
With Ubuntu 16 (from a fresh Docker install):
apt install -y libxrender1 libxext6