Replies: 2 comments 1 reply
-
Use the react-pdf-scale package to scale the text layer independently of the canvas. You could do something like this: |
Beta Was this translation helpful? Give feedback.
1 reply
-
Please refer to #332 (comment). |
Beta Was this translation helpful? Give feedback.
0 replies
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.
-
#332
Hey, I am having issues similar to this Textlayer out of alignment one. On resize, when I make my window smaller the textLayer gets out of alignment with what's rendered on the canvas. I was thinking maybe the font itself doesn't change its size and only the container does. I have tried most of the suggested solutions there but it doesn't seem to work. Any help would be nice...
.document-content .react-pdf__Page canvas, .react-pdf__Page__textContent, .react-pdf__Page__annotations { max-width: 100%; height: auto !important; }
I added this following porvided samples in this repo so the page canvas
could be responsive and textLayer/annotations wouldn't get out of their container.
Beta Was this translation helpful? Give feedback.
All reactions