用python将pdf文件转为word

pdf-->word

晚上做了个梦,梦到在做测试,早上起来特别想学习,准备在课上看下mybatis,可是只有pdf版本感觉用起来不舒服,于是想看下有没有将pdf转成word的脚本

【代码】

from pdf2docx import Converter
pdf_file = 'pdf文件'
docx_file = '目标word文件'
cv = Converter(pdf_file)
cv.convert(docx_file, start=0, end=None)
cv.close()

【原文链接】6行代码!用Python将PDF转为word - 云+社区 - 腾讯云 (tencent.com)

posted @ 2022-03-10 08:29  我是一个大废物  阅读(252)  评论(0)    收藏  举报