Example





In This Topic
GdPicture14 Namespace / GdPicturePDF Class / BeforePageOcr Event

BeforePageOcr Event (GdPicturePDF)

In This Topic
This event is raised just before the specified page is going to be processed using the OcrPage or the OcrPages(String,Int32,String,String,String,Single) methods.

Please check the corresponded GdPicturePDF.BeforePageOcrEventHandler for given parameters.

Syntax
'Declaration
 
Public Event BeforePageOcr As GdPicturePDF.BeforePageOcrEventHandler
public event GdPicturePDF.BeforePageOcrEventHandler BeforePageOcr
public event BeforePageOcr: GdPicturePDF.BeforePageOcrEventHandler; 
In JScript, you can handle the events defined by another class, but you cannot define your own.
public: __event GdPicturePDF.BeforePageOcrEventHandler* BeforePageOcr
public:
event GdPicturePDF.BeforePageOcrEventHandler^ BeforePageOcr
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.BeforePageOcr, AddressOf BeforePageOcr
            
'Define the event.
Sub BeforePageOcr(ByVal PageNo As Integer, ByRef Cancel As Boolean) Handles gdpicturePDF.BeforePageOcr
    'Do your stuff here.
End Sub
//Add the event.
GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.BeforePageOcr += BeforePageOcr;
            
//Define the event.
void BeforePageOcr(int PageNo, ref bool Cancel)
{
    //Do your stuff here.
}
See Also