powerpoint.Visible = 1
if outputFileName[-3:] != 'pdf':
    outputFileName = outputFileName + '.pdf'
deck = powerpoint.Presentations.Open(inputFileName)
deck.SaveAs(outputFileName, formatType)
deck.Close()
powerpoint.Quit()
Как преобразовать .pptx в .pdf с помощью Python