将网页内容转换成pdf格式输出

import  pdfkit
url='https://www.cnblogs.com/Lmg66/p/13598803.html'
a=pdfkit.configuration(wkhtmltopdf="C:/Program Files/wkhtmltopdf/bin/wkhtmltopdf.exe")
pdfkit.from_url(url,'ctf常见源码泄露.pdf',configuration=a)

运行截图
生成的文件名
pdf内容图

猜你喜欢

转载自blog.csdn.net/liaoqingjian/article/details/108428260