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
 PDFium - how to implement page filter
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

marek

15 Posts

Posted - Jun 21 2021 :  16:00:59  Show Profile  Reply
Thanks for adding PDFium to the last release IMAGEEN.
I would like to know if it is possible, with the current functions, to implement a page filter.
What I want:
- I have a search term
- with the current functions I can find all pages, were the term was found
- now I would like to say show only these pages

Currently I could only remove other pages but it is not the best solution and probably slow if many pages exists.

Thanks,
Marek

xequte

38196 Posts

Posted - Jun 23 2021 :  06:12:49  Show Profile  Reply
Hi Marek

A global search is on the to-do list. You can use OnFilter method to show only specific pages:

https://www.imageen.com/help/TImageEnMView.OnFilter.html

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

marek

15 Posts

Posted - Jun 23 2021 :  14:54:27  Show Profile  Reply
Hi Nigel,

thanks foe the hint with OnFilter.
It works great with TImageEnMView. It shows only pages I want show.
Unfortunatelly it seems that

ImageEnMView.AttachedImageEnView := ImageEnView;


does not work. ImageEnView shows all pages.
Would it be possible to fix it in the next release?
Go to Top of Page

xequte

38196 Posts

Posted - Jun 23 2021 :  18:53:50  Show Profile  Reply
Hi

Can you be more specific? Do you mean that navigation in the TImageEnView goes to filtered pages?

Nigel
Xequte Software
www.imageen.com
Go to Top of Page

marek

15 Posts

Posted - Jun 27 2021 :  17:04:28  Show Profile  Reply
It is probably simpler to get the PdfViewer demo.
I have added the following code for filter event:

procedure TfrmMain.ImageEnMView1Filter(Sender: TObject; Index: Integer;
              const Filename: string; var ShowFrame: Boolean);
var pageNrStr: string;
    filter: string;
begin
   filter := ',2,5,8,';
   pageNrStr := ','+ExtractFilename(Filename)+',';
   if  not filter.Contains(pageNrStr)then
      ShowFrame:= false;
end;


Please load pdf file with more as 8 pages.
On the left we can see only filtered pages - corectly!
Now try to use buttons for next, prior, last - nothing happens there.
If the controls are linked with:
ImageEnMView.AttachedImageEnView := ImageEnView;

I would expect that next, prior, first, last - are internal implemented.
Of course next, prior,first, last - should shows only the pages: 2,5,8.
Go to Top of Page

xequte

38196 Posts

Posted - Jun 28 2021 :  01:23:46  Show Profile  Reply
Hi Marek

In v10.0.2 you can use the TImageEnView.OnImageSeek event. Email me for a pre-release to test it.

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