Get the original size of pdf in each page

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version

Detailed description of issue
Is it possible to get the original height and width of pdf in each page? because I want to normalize the coordinate I got when I clicking the mouse in the viewer

Expected behaviour
when clicking the mouse inside pdf I will get the coordinates of the mouse, the coordinates should be normalized between 0 and 1

Code snippet
this is the code I refer to the previous answer, and I was wondering if I can get a normalized coordinate

Hi there,

We have a guide here to normalize coordinates between window and PDF pages:

However you will need to convert these values to normalize it between 0 and 1.

Best regards,
Kevin Kim

Hello Kevin,

Thank you for the answering and also I wonder if it’s possible to get the current zoom ratio of the viewer?

Like in this picture is there a function I can get the number 88?

Best regard,

Hi there,

To get the current zoom level of the document, please use the getZoomLevel API:

Best regards,
Kevin Kim