-
Notifications
You must be signed in to change notification settings - Fork 10k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Marquee Zoom Feature #1260
Comments
Sounds like a relatively simple tasks to implement -- just to follow steps in #3684. Also does not require knowing pdf.js internals. Setting good for beginner for now. |
Hello Yury, |
I want to work on this bug. How should I start? Do I have to modify viewer.js for this? I know how to make a selection area using a canvas (and displaying a crosshair). I'll have to figure out how to do that in PDF.js and also how to zoom in the selected text. |
I am working on this feature and when I draw a rectangle using marquee zoom tool, i see that entire page turns blank. I am not sure if it is related to existing bugs My environment info: I am not sure if it is because of existing issue i mentioned or i could be doing something wrong. Also is there a way to turn off text selection using code? |
@RahulMetangale Sorry. But I have already done this part. I just have to do some small changes in it. And then I will send a pull request. |
Is this still open? I have quiet a few things done for this. Only main pending item is - how to scroll to a particular region in a page after zoom (scale has changed)? Is there any API for this? If not, any recommendations on best way to get zoomed-offset to display? |
@skjindal93 Any update on your pull request? |
@RahulMetangale or @VikramN any chance either of you got something working since @skjindal93 disappeared? |
@Pheil No, i stopped working on this after @skjindal93's comment |
@Pheil @RahulMetangale I am also in need of this feature.. Tried to pass on X & Y position in scrollPageIntoView method which returns left and top. But no luck in positioning the zoomed area in the view port. If you guys look at scrollPageIntoView you may get some idea... |
Hey is anyone still working on it??? If no one is working then can I take this issue? |
@vikasmahato I think nobody is working on this right now, so feel free to take it! |
@Pheil @timvandermeij Can you please guide me on how to start?? What I have understood so far is this:
|
Take a look at how for example Adobe Reader/Acrobat does it. You need to be able to draw a rectangle around an area of interest, get the bounding box and zoom into that region. In This tool is supposed to go into https://github.com/mozilla/pdf.js/blob/master/web/pdf_cursor_tools.js, where there is already some preparation for this; see https://github.com/mozilla/pdf.js/blob/master/web/pdf_cursor_tools.js#L21. Refer to that file also for how the other cursor tools work/are toggled. |
@timvandermeij I have implemented most of the stuff. Can you please tell me how can I draw the rectangle over the canvas? Do I have to use the overlayManager to do so? |
You don't have to draw a rectangle on a canvas. You can use css-styled div with border to show the rectangle. |
@vikasmahato I have a hack I added to my extension which might give you some ideas how to draw the rectangle. https://github.com/Pheil/file-search-wx/blob/master/js/context_ss.js |
@Pheil @yurydelendik @timvandermeij I have implemented both the drawing of a rectangle and zooming in. The only hurdle I am facing now is how to scroll to a particular region in a page after zoom. |
@Pheil @yurydelendik @timvandermeij Can you please have a look at this PR and help me out with my previous query regarding setting the scrollbar position |
@timvandermeij , I would like to solve this issue. Could I ? |
There is already a pull request above, but there is an open question there. Perhaps you could help out with that, or alternatively find a different issue to work on. Thanks. |
I'm facing this same issue. Is there any updates/improvements in this issue? I have to implement this zoom rectangle/marquee zoom in pdf.js viewer some how. |
Any updates on marquee zoom feature in pdf.js? Or is there any plugin/library to implement this feature.I need this feature in my application to view pdfs. |
any update on this feature |
A marquee zoom tool would be a useful feature. Having a zoom selection style similar to how "Print Edit 7.1" does their selection box is visually appealing.
The text was updated successfully, but these errors were encountered: