LibreOffice Generated PDF Won't Open Elsewhere

I’m running a python script on my Raspberry Pi to convert a docx file to a PDF file through headless LibreOffice using the code

output = subprocess.check_output(['soffice','--headless', '--convert-to', 'pdf' ,script_path +'Results.docx'])

The PDF generates fine but on every other platform I have access to (mac OS catalina and Android 10), the PDF will not open and an error message is generated.

Unfortunately not! That just tells me how to do the conversion. I can create the PDF fine and it will open on the Pi, but not anywhere else…

What is the error message? and where is the file being stored? this might be important to figuring out what is wrong.

Definitely looks like a bug - please report it, attaching a sample document, generated PDF, and specifying all relevant system info.