[英]creating pdf file with python using pdfkit
I am trying to use pdfkit module on python to create pdf file from text.我正在尝试在 python 上使用 pdfkit 模块从文本创建 pdf 文件。 the first time I ran the following code, it was alright, but after the second attempt the background of the created file is dark, I tried to write this code into a different file and execute it but the result is the same.
我第一次运行下面的代码,没问题,但是第二次尝试创建文件的背景是黑暗的,我试图将这段代码写入另一个文件并执行它,但结果是一样的。 Would somebody please show me how to fix it.
有人请告诉我如何解决它。 Thanks.
谢谢。
This is the code I tried to test the pdfkit:这是我尝试测试 pdfkit 的代码:
#!/usr/bin/python3
import pdfkit
pdfkit.from_string('MicroPyramid', 'micro_2.pdf')
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.