Answer
There isn't a way to repair a document attachment that's already corrupted in place. The practical fix is to delete the broken attachment and re-attach the file (regenerating or re-uploading the PDF) to the same document revision — this replaces the unreadable file without needing to touch the underlying invoice record itself.