Although GroupDocs.Redaction itself does not contain OCR as a part of its distributable, it allows you to integrate any paid or free OCR solution.
You have to implement IOcrConnector interface and its RecognizeImage() method, taking a stream with an image as an argument and returning a structured representation of the text, including bounding rectangles.
C#
publicclassMyOwnOcrConnector:IOcrConnector{publicMyOwnOcrConnector(){}publicRecognizedImageRecognize(StreamimageStream){// TODO Create an instance of RecognizedImage class using OCR result returned by your OCR toolkitthrownewNotImplementedException();}}
Once the instance is passed to RedactorSettings constructor, GroupDocs.Redaction will use it for image files and embedded images during an ordinary textual redaction process.
C#
using(Redactorredactor=newRedactor("\\Sample.docx",newLoadOptions(),newRedactorSettings(newMyOwnOcrConnector()))){// Assign an instance before using Redactorredactor.Apply(newExactPhraseRedaction("John Doe",newReplacementOptions(Color.Black)));redactor.Save();}
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.