odoo12安装Wkhtmltopdf打印出pdf已损坏

问题:

安装了Wkhtmltopdf后,在odoo中打印出的报表显示为已损坏。

odoo发出了一个警告提示版本不对,需要安装qt补丁。

2020-03-10 01:53:27,152 9236 WARNING warehouse_management odoo.addons.base.models.ir_actions_report: wkhtmltopdf: b'The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.wkhtmltopdf: cannot connect to X server \n' 

方案:

1、查看安装的版本,发现版本为0.12.4

2、卸载当前旧版

yum remove wkhtmltopdf

3、官网下载最新:https://wkhtmltopdf.org/downloads.html,根据个人系统下载版本。

根据官方提示0.12.5版本带有qt修补丁。

4、使用yum安装

 

 5、重启odoo发现已经可以用,但是打印出来没有中。

 

 6、需要安装中文字体

参考:https://blog.csdn.net/qq_36949713/article/details/93501939

参考:https://www.cnblogs.com/hellojesson/p/7681427.html

参考:https://blog.csdn.net/weiguang1017/article/details/80229133

由于参考了几篇博客操作,最终才可以。

 

posted @ 2020-03-10 15:15  祝星呐~  阅读(939)  评论(0编辑  收藏  举报