When you open a document from a stream without a file name, or when the file extension does not match the actual format, pass the expected format through LoadOptions.FileType. GroupDocs.Redaction skips automatic format detection and uses the type you specify.
Set FileType to any supported constant from the FileType class, for example FileType.DOCX or FileType.PDF. The default value is FileType.Unknown, which keeps the existing detection behavior.
The following example demonstrates how to load a document from a stream and from a file path while explicitly specifying the file type:
Along with full featured .NET library we provide simple, but powerful free Apps.
You are welcome to perform redactions for various document formats like PDF, DOC, DOCX, PPT, PPTX, XLS, XLSX, Emails and more with our free online Free Online Document Redaction App.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.