Nelsonkenneth / Online-PDF-to-Audio-converter-

A program that can read any PDF text file and convert it to an Audio file. In this Repository we have the main python program and sub programs like the function to read the PDF file and others
MIT License
1 stars 1 forks source link

Delete unrequired files from PDF #2

Open Nelsonkenneth opened 1 year ago

Nelsonkenneth commented 1 year ago

here a function to delete unrequired files from pdf so it can be easier to convert

def delete_ppms(): for file in os.listdir(PATH): if '.ppm' in file or '.DS_Store' in file: try: os.remove(PATH + file) except FileNotFoundError: pass