select some rectangle area and just return coordinates

How Can we select the rectangle using mouse and return the coordinates using ASP.NET MVC



1 Reply

CK Chinnamunia Karthik Chinna Thambi Syncfusion Team July 18, 2022 11:23 AM UTC

Hi Prasad,


We can able to get the coordinates of the rectangle annotation. Kindly add the following code snippet in your application to get the coordinates of the annotation.

Code snippet :

    window.onload = function(){

        var viewer = document.getElementById('pdfviewer').ej2_instances[0];

        viewer.annotationAdd = function (e) {

            console.log(e);

        }

    }


Screent shot :


Steps to get the coordinates :

  • Run the sample.
  • Provide the code snippet.
  • Add the annotation in the pdf viewer.
  • You can get the coordinates in the console window.


Video Sample  -    https://www.syncfusion.com/downloads/support/directtrac/general/ze/Sample822057691.zip


Loader.
Up arrow icon