标签:string 爬虫 span sof 网页转pdf ant ros conf ble
解决办法:
代码中设置参数:
path_wk = r‘D:\Program Files\wkhtmltopdf\bin\wkhtmltopdf.exe‘ #wkhtmltopdf安装位置
config = pdfkit.configuration(wkhtmltopdf = path_wk)
最后执行转pdf操作
pdfkit.from_string("hello world","1.pdf",configuration=config)#字符转PDF
pdfkit.from_files("hello world","1.pdf",configuration=config)#网页转PDF
python 爬虫,网页转PDF:OSError: No wkhtmltopdf executable found
标签:string 爬虫 span sof 网页转pdf ant ros conf ble
原文地址:https://www.cnblogs.com/qiu-hua/p/9124510.html