我想使用ubuntu16.x中的python3.x将PDF转换为docx。我看了下面给出的代码:
for top, dirs, files in os.walk(pdfdir):
for filename in files:
if filename.endswith('.pdf'):
i = i + 1
abspath_pdf = os.path.normpath(os.path.join(top, filename))
print 'Converting {0} into .doc format..'.format(abspath_pdf)
subprocess.call('{0} --invisible --convert-to doc{1} --outdir "{2}" "{3}"'
.format(lowriter, outfilter, docdir, abspath_pdf), shell=True)
但这对我不起作用。有人能帮上忙吗?
提前谢谢。
发布于 2019-10-23 12:10:31
您可以使用PDF将Aspose.Words格式转换为MS Word格式https://products.aspose.cloud/words/python您还应该注意到,PDF格式是固定的页面格式,MS Word格式是流动格式。这使得从PDF到MS Word的转换任务相当困难。PDF可以识别Aspose.Words中的元素,因此输出结果在MS Word中是可编辑的。请参阅以下链接以了解有关PDF to Word转换https://docs.aspose.cloud/display/wordscloud/Convert+PDF+Document+to+Word的更多信息
https://stackoverflow.com/questions/58431905
复制相似问题