Different coordinates while highlighting the same pdf
I am highlighting a pdf using this tool in browser. My other use case is to pass the required highlights from backend and render in browser. However for the same text highlighted coordinates in browser are different than the coordinates passed from backend. Python fitz module is used to send the highlight coordinates from backend. As I missing something here that needs to be considered while highlighting and rendering(eg: coordinate units or anything else)
Have you looked into usePdfCoordinates?
Have you looked into
usePdfCoordinates?
Could you explain a bit?
An explanation on .usePdfCoordinates would be nice.
This was a very long time ago so I apologize not remembering exactly how it works. However, I do not recommend using it unless you are willing to go in and edit the source code as there is an error with using usePdfCoordinates, which calls the pdfToViewport(scaled, viewport) function https://github.com/agentcooper/react-pdf-highlighter/issues/73
Fixed in #244.