GroupDocs.Parser raises exceptions from groupdocs.parser.exceptions for invalid inputs, unsupported formats, and access issues. Catch these exceptions to provide clear feedback and retry logic.
Handle unsupported formats
fromgroupdocs.parserimportParserfromgroupdocs.parser.exceptionsimportUnsupportedDocumentFormatExceptiontry:withParser("./unknown.xyz")asparser:reader=parser.get_text()print(readerifreaderelse"No text available.")exceptExceptionase:print(e)
Troubleshooting checklist
Confirm the file path exists and is readable by the current user.
If the document is password-protected, provide the password via LoadOptions.
For image-heavy PDFs on Linux, install libgdiplus and font packages.
Review the API reference for method-specific exceptions and option requirements.