Conversation
|
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. |
|
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! |
|
That looks good to me! My point stands though - I'll be merging this in the next major release. :) Thanks! |
|
Great, thank you @wojtekmaj! |
2d488c1 to
a077571
Compare
1f758cc to
ce6db03
Compare
42a8c3c to
0d68fee
Compare
d0aabb2 to
736f3f3
Compare
This comment has been minimized.
This comment has been minimized.
wojtekmaj
left a comment
There was a problem hiding this comment.
Hey @courtneypattison - I'm preparing a new major release so I'm coming back to this long standing PR. I rebased your PR and made it align with breaking changes in PDF.js. Thanks for your patience with this.
It seems like this PR is not doing the trick fully; we're only making the canvas larger while we're rendering it at a smaller scale, making it blurry, and we're also leaving text and annotation layers unchanged.
|
@wojtekmaj thank you for your hard work on this project! It's likely blurry because the device pixel ratio isn't being accounted for in the canvas's render size. You may also want to account for userUnit, which redefines the PDF's scale in some scenarios (e.g. over 200 inch PDFs). You can see how we get an accurate scale in Pattern Projector. Ignore |
7c796f2 to
88585fc
Compare
Sets the scale to the actual size of PDF :)
Fixes #1219