ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 onProgress + dynamically created ImageEnMView.IEMBitmap.CreateSearchablePDF
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

aleatprog

143 Posts

Posted - Oct 05 2025 :  16:31:26  Show Profile  Reply
Hi,

if I dynamically create a TImageEnMView inside a TTask, how may I intercept its onProgress event during mageEnMView.IEMBitmap.CreateSearchablePDF to visualize the percentage of page progress?

procedure TfrmMain.Button1Click;
begin
  TaskCreateSearchablePDF := TTask.Create(procedure begin
    CreateSearchablePDF;
  end);
  TaskCreateSearchablePDF.Start;
end;

procedure TfrmMain.CreateSearchablePDF;
var
  IEMView: TImageEnMView;
begin
  IEMView:= TImageEnMView.Create(nil);
  try
    IEMView.MIO.LoadFromFile(source);
    IEMView.IEMBitmap.CreateSearchablePDF(path, title, lang, seg, frm, ocr);
  finally
    IEMView.Free;
  end;
end;

Ale

xequte

39279 Posts

Posted - Oct 06 2025 :  08:16:53  Show Profile  Reply
Hi

Firstly, you can simplify your code as follows:

procedure TfrmMain.CreateSearchablePDF;
var
  IEM: TIEMultiBitmap;
begin
  IEM := TIEMultiBitmap.Create();
  try
    IEM.LoadFromFile(source);
    IEM.CreateSearchablePDF(path, title, lang, seg, frm, ocr);
  finally
    IEM.Free;
  end;
end;


And you can assign a OnProgress method to the OnProgress event:

http://www.imageen.com/help/TIECustomMultiBitmap.OnProgress.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: