Convert pixel to point in server side in React PDF Viewer component
23 Jul 20261 minute to read
Syncfusion® PDF Viewer renders pages at a 96 DPI resolution and obtains the annotation bounds in pixels on the client side. However, PDF coordinates are measured in points, which use a 72 DPI unit system. Therefore, when using these values on the back end, the pixel values must be converted to points using the following calculation.
pointX = pixelX * 72 / 96
pointY = pixelY * 72 / 96
pointWidth = pixelWidth * 72 / 96
pointHeight = pixelHeight * 72 / 96