pdf转word导师发的论文,转成word好用gpt翻译,pdf有好多烦人的断行
from pdf2docx import Converter
from pdf2docx import parse
import os
pdf_Dir = r"C:\Users\HP\Desktop\论文"
list_pdf_file = os.listdir(pdf_Dir)
for pdf_file in list_pdf_file:
docx_filename_all = os.path.join(pdf_Dir,pdf_file.replace(".pdf",".docx"))
# 方式1:
parse(os.path.join(pdf_Dir,pdf_file), docx_filename_all)