GdPicture.NET.14.API
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 GdPicturePDF.OcrPage or the GdPicturePDF.OcrPages methods. It is fired after the GdPicturePDF.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 GdPicturePDF.OcrPages 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