Delphi EventHandler Demo

Example requests & Code samples for GdPicture Toolkits.
Post Reply
phaeteon
Posts: 1
Joined: Tue Feb 18, 2020 2:15 pm

Delphi EventHandler Demo

Post by phaeteon » Tue Feb 18, 2020 2:40 pm

Ha anyone used a Eventhandler on Delphi?
var
_NativePDF: GDPicturePDF;
__GdPicturePDF1: __GdPicturePDF; //seem to be the definition of EventHandler
begin
_NativePDF.NewPDF;
_NavePDF.LoadFromFile(xxx,false)

__GdPicturePDF1.OcrPagesProgress:=???? how to combine with _NativePDf ?

_NativePDF.OcrPagesProgress:=OcrPagesProgressEvent;
_NativePDF.OcrPages_4('*',8,'deu',DictPath,'',300,OCRMode_FavorAccuracy, 30000, True);

User avatar
Loïc
Site Admin
Posts: 5881
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: Delphi EventHandler Demo

Post by Loïc » Wed Feb 19, 2020 2:42 pm

I tried to figure out how to achieve that with no success...
The event definitions are located into the __GdPicturePDF class.
My assumption is we have to query __GdPicturePDF interface from an ole object instance like this:


definition part:

Code: Select all

  public
     FGdPicturePDF : GdPicturePDF;
     FGdPicturePDFEvents :  __GdPicturePDF;
initialization:

Code: Select all

 FGdPicturePDF :=  CreateOleObject('GdPicture14.GdPicturePDF') as GdPicturePDF;
  FGdPicturePDF.QueryInterface( __GdPicturePDF, FGdPicturePDFEvents);

  FGdPicturePDFEvents.PageBitmapOcrReady := PageBitmapOcrReady; <--------- I am stuck there. Have no f****** idea how to subscribe the event...

Will try to find some competences around, if I can obtain anything I will report here...

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest