简体   繁体   English

在 Bitnami 打包的 Odoo 15 中安装 Wkhtmltopdf 扩展问题

[英]Install The Wkhtmltopdf Extension issue in Odoo 15 Packaged By Bitnami

Install The Wkhtmltopdf Extension issue in Odoo 15 Packaged By Bitnami For Windows / Linux / MacOS / OS X VM在 Odoo 15 中为 Windows / Linux / MacOS / OS X VM 安装 Wkhtmltopdf 扩展问题

I got this error when using odoo 15 on VMware workstation 16在 VMware 工作站 16 上使用 odoo 15 时出现此错误

Error / issue image |错误/问题图片 | screenshot截屏

this is what the error shows in my odoo web interf这就是我的 odoo web 接口中显示的错误

Report 

Unable to find Wkhtmltopdf on this system. 
The report will be shown in html.<br><br><a
 href="http://wkhtmltopdf.org/"
 target="_blank">wkhtmltopdf.org</a>

anyone can help with this isse?任何人都可以帮助解决这个问题?

I got the same error when using odoo 15 on VMware workstation 16 pro在 VMware 工作站 16 pro 上使用 odoo 15 时出现同样的错误

to be specific:再具体一点:

bitnami_odoo-15.0.202111010-0-linux-debian-10-x86_64-nami - VMware Workstation

I got this issue when I tried to print a pdf:当我尝试打印 pdf 时遇到了这个问题:

wkhtmltopdf 问题 bitnami odoo 15

Report 

Unable to find Wkhtmltopdf on this system. 
The report will be shown in html.<br><br><a
 href="http://wkhtmltopdf.org/"
 target="_blank">wkhtmltopdf.org</a>





(If you didn't try the documentation method, I recommend that you try it first ) (如果您没有尝试文档方法,我建议您先尝试一下)
If you are following the Bitnami by VMware Documentation and it didn't work for you, like in my case then...如果您正在关注VMware 文档中的 Bitnami ,但它对您不起作用,就像我的情况一样......

first, start your odoo 15 on your vm and login:首先,在您的虚拟机上启动您的 odoo 15 并登录:

登录后使用以下命令:sudo -s

Follow these tutorials all of them worked well for me:遵循这些教程,它们都对我很有效:

WKHtmlToPdf WKHtmlToPdf
To print reports, odoo generates an html, send it to wkhtmltopdf which is in charge of the html->pdf transformation.要打印报告,odoo 会生成一个 html,将其发送到负责 html->pdf 转换的 wkhtmltopdf。

$ sudo apt install libxrender1 fontconfig
$ wget http://nightly.odoo.com/deb/xenial/wkhtmltox-0.12.1_linux-trusty-amd64.deb
$ wget http://ftp.fr.debian.org/debian/pool/main/libp/libpng/libpng12-0_1.2.50-2+deb8u3_amd64.deb
$ sudo dpkg -i libpng12-0_1.2.50-2+deb8u3_amd64.deb
$ sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb


在此处输入图像描述



Step 6: Installing Wkhtmltopdf Odoo uses wkhtmltopdf to convert the html reports into pdf format.第 6 步:安装 Wkhtmltopdf Odoo 使用 wkhtmltopdf 将 html 报告转换为 pdf 格式。 But all the versions of wkhtmltopdf does not support odoo.但是所有版本的 wkhtmltopdf 都不支持 odoo。 Here is the process to install the supported version for a system with 64 bit architecture.以下是为具有 64 位架构的系统安装支持版本的过程。 First download the package for installation:首先下载package进行安装:

wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb

Once the package is downloaded install it and copy the files accordingly:下载 package 后,安装它并相应地复制文件:

dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb


sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin




when you are done, restart your vm and it should work ✅✅完成后,重新启动您的虚拟机,它应该可以工作✅✅

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM