以下所有内容都是用python编写的
我创建了一些html文件,每个html文件包含一个表、几个div和一个png
html文件中png的路径如下:
<img src = "C:/Users/jtimmins/Documents/FakeLibra/HTMLs/Logos/Test.png" alt = "Picture of a happy monkey" height="25%"/>
但是,当我使用以下代码时:
config = pdfkit.configuration(wkhtmltopdf="C:\\Program Files\\wkhtmltopdf\\bin\\wkhtmltopdf.exe")
pdfkit.from_file(f, 'PDFs/{0}.pdf'.format(filename.split('.')[0]), configuration=config)
pdf是用tables和div生成的,但是没有png,我需要做什么才能让png呈现呢
目前没有回答
相关问题 更多 >
编程相关推荐