An invalid URI exception was raised when preprocessing a document in the SubdocumentManager.FindSubdocuments method by this method call :
mainPartxml.GetRelationships()
I discovered that the mainPartxml.GetRelationships() can throw an uri exception if an invalid relationship URI is found in the document.xml file of a docx, making the rest of the packge analysis and file resolution crash.
More specifically, this can happens with malformed hyperlink targets.
This causes many sub issues in the conversion process:
For any search of relationships in the document, like resolving hyperlinks or notes, the conversion is throwing URI exception with no indication of what is the problematic URI.
We might need to do some hyperlinks validation before the conversion process.
An invalid URI exception was raised when preprocessing a document in the SubdocumentManager.FindSubdocuments method by this method call :
mainPartxml.GetRelationships()
I discovered that the mainPartxml.GetRelationships() can throw an uri exception if an invalid relationship URI is found in the document.xml file of a docx, making the rest of the packge analysis and file resolution crash. More specifically, this can happens with malformed hyperlink targets.
This causes many sub issues in the conversion process: For any search of relationships in the document, like resolving hyperlinks or notes, the conversion is throwing URI exception with no indication of what is the problematic URI.
We might need to do some hyperlinks validation before the conversion process.