I have been looking to convert a .pptx file to a .pdf file through a Python script for several hours but nothing seems to be working.
What I have tried:
Have a look at the following snippet. It uses unoconv and it's working ex expected on UBUNTU 20.04.
# requirements
# sudo apt install unoconv
# pip install tqdm
# pip install glob
import glob
import tqdm
path = ""
extension = "pptx"
files = [f for f in glob.glob(path + "/**/*.{}".format(extension), recursive=True)]
for f in tqdm.tqdm(files):
command = "unoconv -f pdf \"{}\"".format(f)
os.system(command)
This snippet can be used for different-2 format conversion.
Original Snippet