If document_to_text() is applied to a password-protected PDF, we ignore the non-zero return code from pdftotext and return empty text. If the same function is applied to a password-protected docx file, we raise an exception.
Given that we handle exceptions from document_to_text() in CRATE, I think we should not ignore non-zero return codes from external tools and raise an exception instead. We could also create a specific text extraction exception to handle all failures of this kind.