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
 PDF Save Pages to Document
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

mdgodfrey

USA
41 Posts

Posted - Mar 25 2024 :  15:15:08  Show Profile  Reply
I am looking for preferred way for a user to select pages within a PDF, hopefully by the standard windows selection options, Click, Shift Click, Control click on an ImageENMView showing thumbnails. Then allow the saving of the selected pages in the document to new document. Either via the ImageEnMView or the attached ImageEnView.

Thanks

xequte

38163 Posts

Posted - Mar 25 2024 :  23:23:52  Show Profile  Reply
Hi

If you use the standard PDFium demo, it shows display of all pages in a TImageEnMView:

Demos\Other\PdfViewer\PdfViewer.dpr

You can build an integer array based on the selected indexes and pass it to ExportPages():

http://www.imageen.com/help/TIEPdfViewer.ExportPages.html

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

mdgodfrey

USA
41 Posts

Posted - Mar 27 2024 :  13:17:55  Show Profile  Reply
I can see that this demo allows a single page to be exported.

I don't see a way to select multiple pages visually for the user and then export those.

I have seen that I can add check boxes to the thumbnails and select them one at a time but to be able to Shift click or control click and pick a range or single pages eludes me.
Go to Top of Page

xequte

38163 Posts

Posted - Mar 27 2024 :  21:54:12  Show Profile  Reply
Hi

If you enable multi-selection:

ImageEnMView1.EnableMultiSelect := True;

http://www.imageen.com/help/TImageEnMView.EnableMultiSelect.html

Then you can export selected pages as follows:

// Export the selected pages of a PDF document displayed in a TImageEnMView
// i.e. PDF Viewer is enabled ImageEnView1, and ImageEnMView1.AttachedImageEnView is set to ImageEnView1
ImageEnView1.PdfViewer.ExportPages( 'D:\out.pdf', ImageEnMView1.MultiSelectedImagesList );


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

mdgodfrey

USA
41 Posts

Posted - Mar 28 2024 :  12:25:21  Show Profile  Reply
I am sorry I missed that. Works brilliantly!
Thanks much
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: