Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 17360

How can i convert ppt to pdf in python code?

$
0
0
import osimport comtypes.clientdef ppt_to_pdf(intput_path, output_path):    intput_path = os.path.abspath(intput_path)    output_path = os.path.abspath(output_path)    powerpoint = comtypes.client.CreateObject("Powerpoint.Application")    powerpoint.Visible = 1    slides = powerpoint.Presentations.Open(intput_path)    slides.SaveAs(output_path, 32)    slides.Close()

I use this code for converting ppt file to pdf file, but i want write code without importing comtypes.client because i want this code can execute in computer which don't have powerpoint program.

Secondly, I want to convert file without watermark.

What can i do??

import osimport comtypes.clientdef ppt_to_pdf(intput_path, output_path):    intput_path = os.path.abspath(intput_path)    output_path = os.path.abspath(output_path)    powerpoint = comtypes.client.CreateObject("Powerpoint.Application")    powerpoint.Visible = 1    slides = powerpoint.Presentations.Open(intput_path)    slides.SaveAs(output_path, 32)    slides.Close()

This is my previous code.


Viewing all articles
Browse latest Browse all 17360

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>