development, rails, 服务器

Ubuntu 14.04部署使用wicked_pdf

By jere on 2016-04-20 0 Comments

配置wicked_pdf.rb:

WickedPdf.config = {
exe_path: ‘/usr/local/bin/wkhtmltopdf’
}

sudo apt-get install xfonts-75dpi
$ wget http://download.gna.org/wkhtmltopdf/0.12/0.12.2/wkhtmltox-0.12.2_linux-trusty-i386.deb
sudo apt-get install xfonts-base
sudo apt-get install ttf-wqy-zenhei #这两个是用来render中文的

参考:

http://stackoverflow.com/questions/17557064/wicked-pdf-does-not-run-on-ubuntu-server-wkhtmltopdf-cannot-connect-to-x-serv
http://deveede.logdown.com/posts/256349-wicked-in-pdf-htmlphppdfutf-word-processing

打赏

Leave a comment

您的电子邮箱地址不会被公开。 必填项已用 * 标注