Thank you for the quick reply and suggestion - it worked! If it's not too much trouble, I would advise completing this article:
https://www.phpdocx.com/documentation/cookbook/repair-PDF
with the Ghostscript idea and command line, it could save hours of debugging for other users.