GdPicture.NET.14
GdPicture14 Namespace / GdPicturePDF Class / PageBitmapOcrReady Event
Example





In This Topic
PageBitmapOcrReady Event (GdPicturePDF)
In This Topic
This event is raised when a specified image is ready to be sent to the OCR engine during the process invoked by the OcrPage or the OcrPages(String,Int32,String,String,String,Single) methods. It is fired after the BeforePageOcr event. This event is particularly useful to apply your specific custom pre-processing to the image before recognizing it.

Please check the corresponded GdPicturePDF.PageBitmapOcrReadyEventHandler for given parameters.

Syntax
'Declaration
 
Public Event PageBitmapOcrReady As GdPicturePDF.PageBitmapOcrReadyEventHandler
public event GdPicturePDF.PageBitmapOcrReadyEventHandler PageBitmapOcrReady
public event PageBitmapOcrReady: GdPicturePDF.PageBitmapOcrReadyEventHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdPicturePDF.PageBitmapOcrReadyEventHandler* PageBitmapOcrReady
public:
event GdPicturePDF.PageBitmapOcrReadyEventHandler^ PageBitmapOcrReady
Remarks
The event is always triggered within the caller thread of the OcrPages(String,Int32,String,String,String,Single) method.
Example
The PDF to PDF-OCR sample included in the PDF examples section within the GdPicture.NET Reference Guide demonstrates the usage of this event.
'Add the event.
WithEvents gdpicturePDF As GdPicture14.GdPicturePDF
gdpicturePDF = New GdPicturePDF()
AddHandler gdpicturePDF.PageBitmapOcrReady, AddressOf PageBitmapOcrReady
            
'Define the event.
Sub PageBitmapOcrReady(ByVal PageNo As Integer, ByVal ImageID As Integer) Handles gdpicturePDF.PageBitmapOcrReady
    'Do your stuff here.
End Sub
//Add the event.
GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.PageBitmapOcrReady += PageBitmapOcrReady;
            
//Define the event.
void PageBitmapOcrReady(int PageNo, int ImageID)
{
    //Do your stuff here.
}
See Also