This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
from pdf2docx import Converter
# PDF文件路径
pdf_file = 'TestDataPlan-CET.pdf'
# 输出Word文档路径
word_file = 'd.docx'
# 初始化转换器
cv = Converter(pdf_file)
# 将PDF转换为Word,默认全部页面,可以指定页码范围,如:pages=[0, 1, 2]
cv.convert(word_file, start=0, end=None)
# 关闭转换器,释放资源
cv.close()