我想使用 python 脚本将 csv 转换为 pdf,因此使用pdfkit和wkhtmltopdf进行转换。我需要配置wkhtmltopdf路径。我做了同样的事情,但我得到了错误。
使用的代码:-
config = pdfkit.configuration(wkhtmltopdf='/usr/lib/python2.7/site-packages/wkhtmltopdf')
Error:-IOError: No wkhtmltopdf executable found: "/usr/lib/python2.7/site-packages/wkhtmltopdf"
注意:-wkhtmltopdf 仅存在于上述目录中,但我仍然收到不存在的错误。如何解决这个问题?