Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install WKHTMLTOPDF / WKHTMLTOX on CentOS

Installation verification

Bad

$ wkhtmltopdf https://www.google.fr output.pdf
Loading pages (1/5)
Error: Failed loading page https://www.google.fr (sometimes it will work just to ignore this error with --ignore-load-errors)

Good

# wkhtmltopdf https://www.google.fr output.pdf
Loading pages (1/6)
Counting pages (2/6)                                               
Resolving links (4/6)                                                       
Loading headers and footers (5/6)                                           
Printing pages (6/6)
Done   
wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox-0.12.5-1.centos7.x86_64.rpm
yum -y install xorg-x11-fonts-75dpi xorg-x11-fonts-Type1
rpm -ivh wkhtmltox-0.12.5-1.centos7.x86_64.rpm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment