How to install wkhtmltopdf 0.13.0 on Ubuntu server

2016年4月2日21:42:00 发表评论 3,394 views
  1. At first install xvfb serwer:

    sudo apt-get install xvfb
  2. Get needed version of wkhtmltopdf from http://wkhtmltopdf.org/downloads.html.

    For Ubuntu 14.04 64-bit:

    wget https://bitbucket.org/wkhtmltopdf/wkhtmltopdf/downloads/wkhtmltox-0.13.0-alpha-7b36694_linux-trusty-amd64.deb
  3. Install wkhtmltopdf:

    sudo dpkg -i  wkhtmltox-0.13.0-alpha-7b36694_linux-trusty-amd64.deb 

    Install dependency (if needed):

    sudo apt-get -f install
  4. Create symblic link in /usr/local/bin/:

    echo 'exec xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf "$@"' | sudo tee /usr/local/bin/wkhtmltopdf.sh >/dev/null
    sudo chmod a+x /usr/local/bin/wkhtmltopdf.sh
  • 我的微信
  • 这是我的微信扫一扫
  • weinxin
  • 我的微信公众号
  • 我的微信公众号扫一扫
  • weinxin

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: