如何运行wkhtmltopdf无头?!在Debian Whezzy上安装apt-get install wkhtmltopdf命令wkhtmltopdf --title $SUBJECT -q $SOURCEFILE $OUTPUTFILE错误QXcbConnection: Could not connect to display解决方法:这是a ...

如何运行wkhtmltopdf无头?!
在Debian Whezzy上安装
apt-get install wkhtmltopdf
命令
wkhtmltopdf --title "$SUBJECT" -q $SOURCEFILE $OUTPUTFILE
错误
QXcbConnection: Could not connect to display
解决方法:
这是a bug,修复程序尚未提交到Debian存储库.引用ashkulz(谁关闭了错误报告):
You’re using the version of wkhtmltopdf in the debian repositories, which does not support running headless.
所以你可以……
> Download wkhtmltopdf from source并编译它(参见the INSTALL.md file中的说明;如果已经安装了Qt 4.8,可以从他们的git clone行中删除–recursive选项).
>在xvfb,as suggested by masterkorp in the bug report中运行它.
本文标题为:linux – wkhtmltopdf – QXcbConnection:无法连接到显示器


基础教程推荐
- Ajax返回的json遍历取值并显示到前台的方法 2023-02-14
- Vue前端换行问题 2023-10-08
- ajax基本通用代码示例 2022-12-28
- echarts中X轴显示特定个数label并修改样式的方法详 2022-08-31
- 未知大小图片在已知容器中的垂直和水平居中问题 2022-10-16
- vue + vant 入门(实现登录注册) 2023-10-08
- idea中的new里没有Vue Component 2023-10-08
- Ajax写分页查询(实现不刷新页面) 2023-01-31
- JS一维数组转化为三维数组的实现示例 2023-08-08
- HTML CSS 伪元素添加元素 :before和:after的使用 2022-10-30