GreenOdoo
GreenOdoo copied to clipboard
wkhtmltopdf not working due to path in start.bat on windows platform
The path in start.bat has: "%CD%"\runtime\win32\wkhtmltopdf
But when running, the wkhtmltopdf.exe is not found (even though it is in the "path"). This is because the path has quotes in it, example: "c:\var\odoo"\runtime\win32... (see quotes that were around the %CD%)
Fix by changing start.bat:
%CD%\runtime\win32\wkhtmltopdf (minus the quotes)
(Sorry could not submit this as a pull request.)
http://blog.sina.com.cn/s/blog_7cb52fa80102v67f.html
本文来自Odoo中文社区 原文地址:http://shine-it.net/index.php/topic,16687.msg29281.html#msg29281
1.下载并安装wkhtmltopdf,下载地址: http://wkhtmltopdf.org/downloads.html 本人win7(32位),wkhtmltopdf安装位置:C:\Program Files\wkhtmltopdf
2.把wkhtmltopdf配置成服务。
1)需要用到工具instsrv.exe 和 srvany.exe,下载Windows Server 2003 Resource Kit Tools,安装。本人安装位置C:\Program Files\Windows Resource Kits。
2)在开始运行里输入CMD命令,进入dos然后输入以下: "C:\Program Files\Windows Resource Kits\Tools\instsrv.exe" htmltopdf "C:\Program Files\Windows Resource Kits\Tools\srvany.exe"
3)然后,会发现注册表HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services下多了htmltopdf项,右击在其下添加项Parameters,在Parameters新建字符串Application值为C:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe
3.在环境变量Path里添加wkhtmltopdf安装位置(;C:\Program Files\wkhtmltopdf\bin)
重启机器,ok