我想知道什么是最简单的方法转换txt文件在路径批转换为PDF?在
我已经在Python中研究过了https://github.com/baruchel/txt2pdf 但导入后我似乎无法在终端中调用txt2pdf。在
还有其他建议吗?在
比如:
text_file = open(filename, 'r')
i = 0
for item in text_file:
i += 1
f = open("c:\\workspace\\{0}.txt".format(i), 'w')
txt2pdf convert (whatever goes here)
if i == 7:
break
也用ReportLab尝试过
^{pr2}$
不确定你是否已经找到了解决方案,只是在我搜索与你的问题相关的答案时碰巧看到了这个问题。在
如果您在终端,您可以按以下方式运行:
或者,如果您在jupyter笔记本中运行,请按以下方式运行:
^{pr2}$谢谢。在
相关问题 更多 >
编程相关推荐