DotImage Knowledgebase

Home : Prevent OCR on a Page while Including it in the Final Document
Q10299 - HOWTO: Prevent OCR on a Page while Including it in the Final Document

While OCRing a document it occasionally is necessary to skip a page while still including it in the set of document pages. This can be done by replacing an image with another blank image under the hood.  The ImageSendOff event can be used to swap out the image with a blank. Below is an example of the event handler used to accomplish this:

C#

void engine_ImageSendOff(object sender, OcrImagePreprocessingEventArgs e)

{

      if(IsSkip(CurrentFrame))

{

            e.ImageOut = new AtalaImage(10,10,PixelFormat.Pixel1bppIndexed, Color.White);

}

}

VB.NET

Private Sub engine_ImageSendOff(ByVal sender As Object, ByVal e As OcrImagePreprocessingEventArgs)

    If IsSkip(CurrentFrame) Then

        e.ImageOut = New AtalaImage(10, 10, PixelFormat.Pixel1bppIndexed, Color.White)

    End If

End Sub

 

*IsSkip is a method that would need to be defined to return true when the CurrentFrame is to be skipped.

Related Articles
No Related Articles Available.

Article Attachments
No Attachments Available.

Related External Links
No Related Links Available.
Help us improve this article...
What did you think of this article?

poor 
1
2
3
4
5
6
7
8
9
10

 excellent
Tell us why you rated the content this way. (optional)
 
Approved Comments...
No user comments available for this article.

Powered By InstantKB.NET v1.3
Copyright © 2002, 2013. InstantASP Ltd. All Rights Reserved

preload preload preload