Inclusion as WebView within app destroys pinch zoom #19072
Unanswered
DDHSchmidt
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello community,
I was successful in bundling version 4.8.69 of PDF.js in a multi platform App and displaying PDFs with it.
What I'm struggling with now is the pinch zoom: In my app's webView (tested on a windows Surface device (WebView2-control with Edge engine) and on an Ipad (WKWebView control with Safari engine)).
The slightest attempt to pinch-zoom in any document leads to wild page jumps. Here's an example from an attempt on the iPad:
iPad_pinchZoom_App.mp4
I move my fingers very slowly, yet the pages scroll up and down as if I were moving like a madman.
The app in that example is a very barebones app that only loads&display that one webView that displays the pdf via a local copy of PDF.JS's web/viewer.html
On the other hand, if I open the current demo url via the iPad's builtin Safari browser, there are tearing issues, which I'm aware of for Safari, but the scrolling happens without any scrolling around as I would have expected it:
iPad_pinchZoom_Safari.mp4
The same behaviour is reproducible on my Windows Surface, when comparing the app's WebView-control with the Edge browser.
Has anybody ever encountered something similar and can share their solution?
Or has anybody any solution as to what can cause the pinch-zoom to cause such a behaviour?
I tried digging through
_setCurrentPageNumber(...)
,_updateLocation(...)
,#setScale(...)
,#setScaleUpdatePages(...)
, etc. and a whole lot of other, internal methods that looked like they were responsible for this behviour, but couldn't reach a conclusion :/Beta Was this translation helpful? Give feedback.
All reactions