react-pdf icon indicating copy to clipboard operation
react-pdf copied to clipboard

[breaking] Treat pts as pts

Open courtneypattison opened this issue 4 months ago • 4 comments

Sets the scale to the actual size of PDF :)

Fixes #1219

courtneypattison avatar Feb 11 '24 22:02 courtneypattison

Oooooo that's just lovely! Thank you for that!

I'll happily release this, but in the next major, as this change might end up being very impactful on people's UIs.

Also, we may need some documentation change? Not sure, will have to look into that.

wojtekmaj avatar Feb 12 '24 09:02 wojtekmaj

You're welcome! I'm sorry, I was rushing and messed up the commit. It should be pixels instead of points since the conversion is from pdf to css pixels. Also, the util from pdfjs isn't accessible so I just copied it out. I think it makes what is going on more explicit anyway. Hopefully it's correct this time!

courtneypattison avatar Feb 12 '24 19:02 courtneypattison

That looks good to me! My point stands though - I'll be merging this in the next major release. :) Thanks!

wojtekmaj avatar Feb 12 '24 20:02 wojtekmaj

Great, thank you @wojtekmaj!

courtneypattison avatar Feb 12 '24 20:02 courtneypattison