This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
def pptx2pdf(): | |
""" | |
Install unoconv on your system. | |
""" | |
for filename in os.listdir(os.getcwd()): | |
if filename.endswith(".pptx"): | |
os.system(f'unoconv -f pdf "{os.path.join(os.getcwd(), filename)}"') | |
print(f"Converted {filename} to {os.path.splitext(filename)[0]}.pdf") |