Organize Pages - selected pages collection

Hi,

Is it possible to access programmatically the selected pages from the Organize Pages view? I want to implement a split document operation, but I'm wondering how that can be achieved on the front-end side using the PDF viewer and more specifically the Organize Pages view.


2 Replies 1 reply marked as answer

PA Priyadharshini Annamalai Syncfusion Team April 2, 2025 12:02 PM UTC

Hi 


We will assess the feasibility and provide an update within two business days, by April 04, 2025.


Regards,

Priyadharshini



PA Priyadharshini Annamalai Syncfusion Team April 4, 2025 12:41 PM UTC

Hi


We have provided the code snippet and sample to get the selected page indexes.

 

Code snippet:

 

app.component.css file:

    /* The below CSS enables the browser scrollbar. */

    .e-dlg-target.e-scroll-disabled {

        overflow: visible !important;

    }

 

 

app.component.ts file:

 

getSelectedPages() {

    const selectedPageDivs = document.querySelectorAll(

      '.e-pv-organize-node-selection-ring'

    );

    // Collect selected pages as an array of indexes

    let selectedPages: any = Array.from(selectedPageDivs).map((div) =>

      parseInt(div.id.replace('anchor_page_', ''))

    );

    console.log(selectedPages);

  }

 

Sample: Hpztzwn3 (forked) - StackBlitz

 

Steps to get the selected page indexes:

 

  • Run the sample.
  • Open the organize window and select the pages. The class 'e-pv-organize-node-selection-ring' is now added to the selected pages. Based on this class name, we obtain the page index and print it in the console when clicking the "Get Selected Pages" button.

 

Please try this sample and let us know, if you have any concerns. 


Regards,

Priyadharshini


Marked as answer
Loader.
Up arrow icon