As an alternative to a local file, Redactor can open a document from stream.
The following example demonstrates how to load and redact a document using Stream:
finalFileInputStreamstream=newFileInputStream("sample.docx");try{finalRedactorredactor=newRedactor(stream);try{// Here we can use document instance to make redactions
redactor.apply(newDeleteAnnotationRedaction());redactor.save();}finally{redactor.close();}}finally{stream.close();}
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.