将100k左右的word文档转为pdf,用时最短的库是什么?目前我用的是这个:
def convertDocxToPDF(infile,outfile):
wdFormatPDF = 17
word =
comtypes.client.CreateObject('Word.Application')
doc = word.Documents.Open(infile)
doc.SaveAs(outfile, FileFormat=wdFormatPDF)
doc.Close()
word.Quit()
大概要20s左右,有没有效率更高的方法?
相似问题