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

[BUG] Pinch to Zoom offset #106

Closed heihitesh closed 9 months ago

heihitesh commented 10 months ago

📝 Describe the Bug

When we perform, a pinch to zoom action in a pdf, It start to zoom in on a different position ( From top-left)

📖 Library Version

implementation "com.github.afreakyelf:Pdf-Viewer:2.0.5"

🚶 Steps to Reproduce

I am using this 1) <com.rajat.pdfviewer.PdfRendererView android:id="@+id/pdfView" android:layout_width="match_parent" android:layout_height="match_parent" app:pdfView_divider="@drawable/pdf_viewer_divider" app:pdfView_showDivider="false" />

2) Simply load a pdf from a File object. 3) Now do a "pinch to zoom" action, in the center. 4) You will see instead of zooming the center, it would zoom the top-left corner of the pdf

🤔 Expected Behavior

It should zoom the place where the action is performed

🖼️ Screenshots/Videos

Can add, if the issue is not reproducible or unable to understand

📱 Smartphone Info:

Android 13, Samsung


github-actions[bot] commented 10 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.

angad305 commented 10 months ago

Same issue here, the zoom in Android 13, Samsung - pinch to zoom is not proper.

angad305 commented 10 months ago

https://github.com/afreakyelf/Pdf-Viewer/assets/34420642/b6876b87-2a4d-465c-beb5-5d1dc55d6bc7

Just to reproduce the issue, in the video i am zooming in the centre of the screen, but the zoomed part is the top left. thats the issue.

github-actions[bot] commented 9 months ago

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

angad305 commented 9 months ago

any update on the issue guys?

afreakyelf commented 9 months ago

Sorry for the delay. I am working on this now and should be able to release soon.

afreakyelf commented 9 months ago

Hi, Thanks for using the library. Please update your library to latest version. https://github.com/afreakyelf/Pdf-Viewer/releases/tag/v2.0.7

Thanks!