为了账号安全,请及时绑定邮箱和手机立即绑定

生成不了pdf,运行也没报错

生成不了pdf,运行也没报错_
import os
from win32com.client import constants,gencache
def createpdf(wordPath, pdfPath):
    word =gencache.EnsureDispatch('Word.Application')
    doc = word.Documents.Open(wordPath, ReadOnly=1)
    doc.ExportAsFixedFormat(pdfPath, constants.wdExportFormatPDF)
    word.Quit()
    createpdf('D:/jw/study/python/writeexcel/info.docx','D:/jw/study/python/writeexcel/info.pdf')


正在回答

举报

0/150
提交
取消

生成不了pdf,运行也没报错

我要回答 关注问题
意见反馈 帮助中心 APP下载
官方微信