Giter Club home page Giter Club logo

Comments (13)

slestang avatar slestang commented on September 28, 2024 2

@wonday: I just tested version 1.3.5 on an iPhone 5 with a PDF which have a janking scroll with previous version and the problem is still here (perhaps slightly improved).
The PDF seems heavy to render so perhaps it is just that the PDF renderer has difficulty handling the touch events and updating the screen.

from react-native-pdf.

yamov avatar yamov commented on September 28, 2024 1

The feature of scrolling is:
when scrolling if has a touch then stop.

It doesn't seem to work like that on iOS (tried iOS 11 on a real device and simulator and iOS 10.3.1 in the simulator).
When a page is being scrolled fast, a touch doesn't stop the scrolling. If the page is being scrolled slowly, in some cases a touch kind of stops it, but at some random(?) position. And it doesn't always work anyways.

Apart from that, the scrolling behaviour in general seems laggy and not smooth.

Scrolling works as expected on Android, though.

For now I ended up using this plugin for Android and WebView for iOS

from react-native-pdf.

wonday avatar wonday commented on September 28, 2024

The feature of scrolling is:
when scrolling if has a touch then stop.
so if when scrolling up and drag up, it will stop then continue scrolling up (the second drag)
if when scrolling up then drag down, it will stop then scrolling down
if when scrolling up then touch(not move) it will stop.

"the pages look glitchy" are you meaning you can see the page without text?
Because it moves out drawing buffer, for memory and performance reason, I do not cache every page.

from react-native-pdf.

agersoncgps avatar agersoncgps commented on September 28, 2024

iOS 11. Not inside Native Base controls. I am seeing scrolling issues when pinching and zooming. When zoomed in scrolling from side to side or up and down on a single page is very slow. When I pinch to zoom out to the original size the pdf image studders and twitches.

Screen capture:
https://www.dropbox.com/s/lei3dg425sjqz6y/IMG_0026.mov?dl=0

from react-native-pdf.

keviniamburg avatar keviniamburg commented on September 28, 2024

Just a quick update: I couldn't find a solution so I also resorted to using a WebView for iOS. Performance is a lot better now.

from react-native-pdf.

brunoti avatar brunoti commented on September 28, 2024

@SlickDev I'm having some blank screens sometimes on opening PDF's with iOS WebView and when I use renderLoading and startInLoadingState the PDF never opens. Have you had these problems?

from react-native-pdf.

keviniamburg avatar keviniamburg commented on September 28, 2024

@brunoti Yes, exactly. When I used renderLoading and startInLoadingState the pdf never opened. I believe it worked in the emulator, but not on device.

from react-native-pdf.

agersoncgps avatar agersoncgps commented on September 28, 2024

I don't think this is the right place to discuss issue with iOS WebView. This post should be reserved for iOS scrolling issues related to this module.

from react-native-pdf.

wonday avatar wonday commented on September 28, 2024

In my module,
When scroll to first two page or last two page, I will slow down the speed, for not moving out then moving back/elasticity, it will see the blank page.

So when not enough spaces(less then two pages), it only can move, has not Inertial scrolling, maybe this seems not smoothly.

If it has enough spaces(more then two pages to destination), it moves first then Inertial scrolling.
But one swipe only can move max tow page distance, some said too faster if I move more then two pages.

So now is the trade off result.

from react-native-pdf.

wonday avatar wonday commented on September 28, 2024

@ALL,
I have improved scrolling, please use ver1.3.5 to test it.

from react-native-pdf.

yamov avatar yamov commented on September 28, 2024

Thanks, @wonday.
But yeah, unfortunately, it feels more or less the same to me. Tested on iPhone 6 and 7Plus. Maybe the scrolling has become slightly more responsive, but still, it's too inertial and keeps on scrolling after the tap. And scrolling itself is not smooth.

from react-native-pdf.

compojoom avatar compojoom commented on September 28, 2024

@wonday - just tested 2.0 + your latest commit from 37min ago: 558dc40

That last commit helps a lot, but there are still some quirks.

With the pdf I test - scroll begins immediatly and feels smooth, but it stops for some reason 1 page before the last. I have to then move the page to the last.

If I try to scroll fast back up, then the scrolling stops 1 page before the first page?

I opened the same pdf in the native viewer on iOS and the above issues are not present.

from react-native-pdf.

wonday avatar wonday commented on September 28, 2024

@compojoom
Thanks for your testing.
It stops because it goes to the border of buffer canvas,
For my test the max buffer canvas is 7 screen size(default the position at center), if I set to 8 it will do not draw anything (maybe memory is not enough)。
I am trying to dynamic adjust the canvas and not effect scrolling...

from react-native-pdf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.