I have installed qpdf and am trying to call it via Python.
I have added the path to my system Environment Variables and can successfully run the following command via the command prompt:
qpdf --decrypt input.pdf output.pdf
This runs, no issues.
However, when trying to call via Python (code from here), I get
'qpdf' is not recognized as an internal or external command, operable program or batch file.
import subprocess
subprocess.call(["cmd", "/c", "qpdf --decrypt input.pdf output.pdf"], shell=True)
# or
subprocess.run(["qpdf", "--decrypt", "input.pdf", "output.pdf"], shell=True)
# or
subprocess.run(["qpdf --decrypt input.pdf output.pdf"], shell=True)
Why can I run this via cmd, but not in Python?