Get the current page viewed/scrolled by the user in DocumentEditor

Hello,

Is it possible to get the current page number of the one the user is seeing, maybe with an event being triggered at scroll ?

Didn't find anything in the API documentation.

Thanks,
Tuan


12 Replies 1 reply marked as answer

KB Kurthis Banu Abdul Majeeth Syncfusion Team August 24, 2021 12:43 PM UTC

Hi Taun, 

Thank you for contacting Syncfusion support. 

We are cross checked your requirement. Documenteditor having “viewChange event “for your requirement. The “viewChange” event will be triggered based on whenever user’s view changed in Document Editor.   

Like below examples,  
1.       If user scroll the pages from first page to second page.  
2.       If user change the view based on “layout types” from web layout to print layout.  
3.       If user change the view based on “page orientation” types from portrait to landscape.  
 
Code Snippet:  
container. documentEditor.viewChange = (args: ViewChangeEventArgs): void => {  
        
      console.log ("changes", args);  
  
   }  


 
Sample Link:   

Documentation Link: 
  

Regards, 
Kurthis Banu A. 



TA Tuan Ardouin August 24, 2021 01:26 PM UTC

Hello,

Thanks for your fast answer.

I'm a bit confused now around the difference between the document-editor and the document-editor-container.

I'm using :

<ejs-documenteditorcontainer>


And in the documentation : 

https://ej2.syncfusion.com/vue/documentation/api/document-editor-container/

the event viewChange doesn't exist. 

Is there a way to access it in Vue ?

Thanks,
Tuan



KB Kurthis Banu Abdul Majeeth Syncfusion Team August 25, 2021 12:52 PM UTC

Hi Taun,  

In Vue platform, you can access like below code snippet to achieve your requirement. 

Code snippet: 
  
 methods: { 
 
    documentViewChangeEvent: function(event)  
   
      console.log('changes', event); 
    } 
  }, 
 
 
 
mounted() { 
    this.Oncreated( 
      this.$refs.documenteditor.ej2Instances.documentEditor, 
      this.defaultDocument 
    ); 
    this.$refs.documenteditor.ej2Instances.documentEditor.viewChange = (event) => { 
      this.documentViewChangeEvent(event); 
    }; 
  } 
 


Please let us know if you have any other questions. 

Regards, 
Kurthis Banu A. 


Marked as answer

TA Tuan Ardouin August 26, 2021 08:43 AM UTC

Hello Kurthis,

Thank you for this example, it works. However, I think that it creates a bug.

The page selector on the bottom left of the component seems to no longer work, it stays at the page 1.

You can see that in the sample you provided :


Is i

Thanks,

Tuan



SM Suriya Murugan Syncfusion Team August 27, 2021 05:13 AM UTC

Hi Tuan, 
  
We can reproduce the reported issue. Currently, we are validating and get back to you by August 31,2021. 
  
Regards, 
  
Suriya M.


KB Kurthis Banu Abdul Majeeth Syncfusion Team September 1, 2021 03:25 AM UTC

Hi Taun,  

We have confirmed the reported issue as bug and logged the defect report. We will fix this issue and include in our patch release which scheduled on September 29, 2021,   
   
You can track the status of bug through below feedback link:   

Regards,  
Kurthis Banu A.  



TA Tuan Ardouin September 2, 2021 10:48 AM UTC

Hello Kurthis,

Thanks for the quick update.

Tuan



KB Kurthis Banu Abdul Majeeth Syncfusion Team September 2, 2021 11:35 AM UTC

Hi Taun,   

Thanks for your update. We will fix this issue and include in our patch release which scheduled on September 29, 2021,    
    
You can track the status of bug through below feedback link:    

Regards, 
Kurthis Banu A. 



KB Kurthis Banu Abdul Majeeth Syncfusion Team October 1, 2021 12:42 PM UTC

Hi Taun,   

We are not possible to include the fix our 2021 volume 3 release. We will fix this issue and include in our EJ2 patch release which scheduled on October 6, 2021.     

You can track the status of bug through below feedback link:      

Regards, 
Kurthis Banu A. 



TA Tuan Ardouin October 1, 2021 12:42 PM UTC

Alright, thanks for the update



KB Kurthis Banu Abdul Majeeth Syncfusion Team October 1, 2021 01:03 PM UTC

Hi Taun,   

Thanks for the update. 

We will fix this issue and include in our EJ2 patch release which scheduled on October 6, 2021, without further delay. We would appreciate your valuable patience until then. 

You can track the status of bug through below feedback link:       

Regards,  
Kurthis Banu A.  



KB Kurthis Banu Abdul Majeeth Syncfusion Team October 13, 2021 10:11 AM UTC

Hi Taun,  

We are glad to announce that our patch release (v19.3.45 ) is rolled out successfully and In that release, we have added the fix for reported issue.
          
Please upgrade the package to latest version to resolve this issue.             
   
Release Notes:   

Feedback Link: 

Regards, 
Kurthis Banu A. 


Loader.
Up arrow icon