ubuntu下安装wkhtmltopdf

3.55K 浏览开发笔记

ubuntu下安装wkhtmltopdf

在AWS ubuntu16.04里安装wkhtmltopdf,html转pdf的软件。  

必须要安装带qt的版本,不然会报错。 

1,先安装 

wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.4/wkhtmltox-0.12.4_linux-generic-amd64.tar.xz  sudo tar xvf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz  sudo mv wkhtmltox/bin/wkhtmlto* /usr/bin/

2,看版本 

wkhtmltopdf --version wkhtmltopdf 0.12.4 (with patched qt)

3,测试 

#create simple html test file echo "test" >> test.html #perform conversion sudo wkhtmltopdf  --disable-smart-shrinking  --lowquality --enable-external-links --enable-internal-links test.html test.pdf

最后于 10月前 被admin编辑 ,原因:
0