afreakyelf / Pdf-Viewer

A Lightweight PDF Viewer Android library which only occupies around 80kb while most of the Pdf viewer occupies up to 16MB space.
https://afreakyelf.github.io/Pdf-Viewer/
MIT License
822 stars 173 forks source link

disproportional vertical scroll when zoomed in #112

Closed asnav closed 8 months ago

asnav commented 8 months ago

📝 Describe the Bug: while zoomed in vertical scroll is disproportional, horizontal scroll works just fine which means zoom is taken into account. i assume there is an extra pan behavior on top of the basic scroll function which makes it too fast.

📖 Library Version: 2.0.7

🚶 Steps to Reproduce: Please follow these steps to reproduce the issue:

  1. load a pdf file
  2. zoom in
  3. scroll up or down
  4. notice that the view moves faster than your finger

🤔 Expected Behavior: the view should move along with he pointer (your finger) at the same speed

github-actions[bot] commented 8 months ago

Thank you for creating your first issue. We appreciate your help in making this project better. We will look into it, and get back to you soon. Need help or want to discuss this issue? Join our Discord community here to ask questions and discuss this issue live!

mlilienberg commented 8 months ago

When google started with instant apps i also implemented a library with a similar approach like this. We use it in production without changes since 2019. This library is published and maintained by a former colleague of mine, you find it here: https://github.com/Dmitry-Borodin/pdfview-android.

I do not want to advertise that library but maybe you can find any technics to improve this one. I was looking into an alternative that is still maintained and has a compose API, but with some weakness like the disproportional scrolling when zoomed I can not use it as a replacement.

So what is the difference? The other library uses a slightly modified clone of subsampling scale imageview to have following benefits:

Maybe it is possible to merge the concepts of those two libraries.

Sasikumars41 commented 8 months ago

📝 Describe the Bug: while zoomed in vertical scroll is disproportional, horizontal scroll works just fine which means zoom is taken into account. i assume there is an extra pan behavior on top of the basic scroll function which makes it too fast.

📖 Library Version: 2.0.7

🚶 Steps to Reproduce: Please follow these steps to reproduce the issue:

  1. load a pdf file
  2. zoom in
  3. scroll up or down
  4. notice that the view moves faster than your finger

🤔 Expected Behavior: the view should move along with he pointer (your finger) at the same speed

Scrolling on vertical is not smooth as horizontal scroll after zoom.

afreakyelf commented 8 months ago

Hi, The Above issue has been fixed in new release. https://github.com/afreakyelf/Pdf-Viewer/releases/tag/v2.1.0

Please migrate to Maven central. More here: https://github.com/afreakyelf/Pdf-Viewer/releases/tag/v2.1.0

Thank you for using the library. Please reopen/raise a new issue if you still face this error.

Join our discord for more updates!

Sasikumars41 commented 7 months ago

Hi,

Please slow down the scrolling speed of the scroll after zoom. It works fine on normal state.

asnav commented 7 months ago

It has indeed not been fixed.

justinmulligan commented 4 months ago

Can this be reopened? The vertical scroll still isn't right.

Sasikumars41 commented 4 months ago

Still Scrolling is not working properly (pdf is in full zoom).