wkhtmltopdf: cannot connect to X server on ubuntu server

    To fix wkhtmltopdf: cannot connect to X server on ubuntu server Follow the steps: Note: Check latest versions here: http://download.gna.org/wkhtmltopdf/
    Download it

    $: wget -q "http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-trusty-amd64.deb"

    Install it

    $: sudo dkpg -i  "http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-trusty-amd64.deb"


    To install dependencies

    $: sudo apt-get -f install
    If still issue do sudo apt-get install xvfb
    5
    Average: 5 (1 vote)