I'm working on a python script that processes PDF files, though some of them contain encryption that restricts usage to only printing, which I have to manually remove before I can process them.
For that I have been manually using QPDF to remove these restrictions on individual PDF files before running the script (the commands for qpdf are pretty simple...inside the command prompt -> qpdf --decrypt input.pdf output.pdf)
My question is - rather than doing this bit manually, is it possible to execute the QPDF executable file within my Python script and run the command? I haven't been able to find any python modules specifically to control QPDF so I am not holding much hope.
subprocess.run(["qpdf", "--decrypt", "input.pdf", "output.pdf"])
– Dancette