Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
wkhtmltopdf: cannot connect to X server #180
wkhtmltopdf --print-media-type --use-xserver --quiet www.google.com ~/google.pdf
But when working from pdfkit v0.5.3 gem in RoR v3.2.1
And Apache error:
We're using Xvfb as Xserver
I had the same issue on Ubuntu Linux. The problem is, that the standard installation of wkhtmltopdf, requires an xserver. You should download a precompiled version. Do this:
now try it:
if that works, put this to /config/initializers/pdfkit.rb
This should be a solution you can adapt for Centos ...
I'm sorry that this is an incredibly old thread, but I've been trying to overcome the same error. On Red Hat (64-bit).