pip install pdfkit pip install py3-wkhtmltopdf 安装wkhtmltopdf并加入到环境变量 https://wkhtmltopdf.org/downloads.html https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox-0.12.6-1.msvc2015-win64.exe
import pdfkit url='https://github.com/wanthering/exportific' #wkhtmltopdf的安装路径 path_wk = r'D:programswkhtmltopdfbinwkhtmltopdf.exe' config = pdfkit.configuration(wkhtmltopdf = path_wk) pdfkit.from_url(url,output_path='./AST.pdf',configuration=config)



