import os
from pdf2docx import Converter
pdf_names = os.listdir("pdf")
docx_names = []
for i in pdf_names:
docx_names.append(i.split(".")[0]+".docx")
for i in range(len(pdf_names)):
pdf_file = pdf_names[i]
docx_file = docx_names[i]
# convert pdf to docx
cv = Converter("pdf/"+pdf_file)
cv.convert("docx/"+docx_file, start=0, end=None)
cv.close()
pdf2word
最新推荐文章于 2024-04-12 09:50:56 发布