How to convert pixel coordinates in 1/72 inches? #1427
Unanswered
stasmotorny
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, guys. I am working on documents signature implementation. It have few steps:
There is few problems in this approach:
As result I can sign the document but with wrong placement of signature. So I need some way to properly convert coordinates taken from react-native-pdf to coordinates that are used by pdf-lib to place signature.
I already tried a lot of variants but no one works fine. In current implementation I'm using formula like this:
(pageHeight - signatureCoords.y) / (160 * PixelRatio.get()) / 72
So maybe someone can give me an advice how to properly place signature in PDF?
Beta Was this translation helpful? Give feedback.
All reactions