【发布时间】:2019-01-29 03:16:02
【问题描述】:
我想将 pandas 数据框保存为 pdf 格式。
import pdfkit as pdf
config = pdf.configuration(wkhtmltopdf="C:\Program Files\wkhtmltopdin\wkhtmltopdf.exe")
pdf.from_url('http://google.com', 'out.pdf',configuration=config)
--> not working somehow even though I downloaded wkhtmltopdin on several different locations
from weasyprint import HTML
HTML(string=pd.read_csv('cor.csv').to_html()).write_pdf("report.pdf")
dlopen() failed to load a library: cairo / cairo-2 / cairo-gobject-2
--> not working : Tried several times to solve this isseue, but cannot download library
我在stackoverflow和其他网站上尝试了5个以上的包和方法,但都无法解决。
还有更多我可以尝试的软件包吗?这让我得了癌症
提前致谢。
【问题讨论】:
标签: python pandas dataframe pdf