【发布时间】:2019-10-17 11:47:14
【问题描述】:
我想在 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)
但它不适合我。有人可以帮忙吗?
提前致谢。
【问题讨论】:
标签: pdf python-3.6 doc