Cannot execute shell command on Microsoft IIS

When my Django application is hosted on IIS, this fragment of code doesn't work.

def convert_to_pdf(input_file, output_file):
    wordfile = input_file
    command = ["soffice", "--convert-to", "pdf", wordfile, "--outdir", os.path.dirname(output_file)]
    subprocess.call(command, shell=True)

When I try to execute the command manually on cmd it works fine. Code

I've tried to grant all permissions to DefaultAppPool but nothing changes.

Back to Top