Wkhtmltopdf Errno::EPIPE (Broken pipe)

Internal error

User can't use pdf exports via pdfkit (invoicing, cost estimation (calculation), exporting templates)

Errno::EPIPE (Broken pipe) or wkhtmltopdf: cannot connect to X server


The problem is that the standard installation of wkhtmltopdf via apt-get, doesn't work on a headless server (0.9.9).

Get needed version of wkhtmltopdf from

1/ sudo apt-get install xvfb
2/ wget
3/ sudo dpkg -i wkhtmltox-0.13.0-alpha-7b36694_linux-jessie-amd64.deb
4/ sudo apt-get -f install
5/ sudo mv /usr/local/bin/wkhtmltopdf /usr/local/bin/xwkhtmltopdf
6/ echo 'exec xvfb-run -a -s "-screen 0 640x480x16" xwkhtmltopdf "$@"' | sudo tee /usr/local/bin/wkhtmltopdf >/dev/null
7/ sudo chmod a+x /usr/local/bin/wkhtmltopdf

Try Easy Redmine in a 30-day free trial

Full-featured, 30 Days, SSL protected, Daily Backups, In your Geo Location