PdfViewPager icon indicating copy to clipboard operation
PdfViewPager copied to clipboard

Continuous scrolling of pages

Open abhinavtestbook opened this issue 5 years ago • 3 comments

Hey , I want to have continuous scrolling of pdf page instead of one by one swipe. As sometimes PDF's contain more than 20 pages , and if we want to go to page no. 15 directly ,its a pain to swipe pages one by one. Any such feature exists ? P.S. Using VerticalViewPager.

abhinavtestbook avatar Sep 01 '20 08:09 abhinavtestbook

Hi,

This is not internally supported in the library. As its name says, the ViewPager widget itself is made to be navigated by swiping, so this requirement would only make sense with a different widget rather than a ViewPager. In the past I tried to implement a PdfRecyclerView which implemented continous scrolling of a Pdf document. It was quite inefficient in terms of rendering, and caused many memory issues. I cancelled the library because it was basically crap :smile:

In order to meet your requirements, I would paint a Custom View on top of the PdfViewPager that implements some sort of "fast scrolling" (a very common UI pattern), so when user drags and drops to a specific page, you can change directly to the mentioned page with a single swipe, instead of going one by one :-)

Hope it helps

voghDev avatar Sep 01 '20 11:09 voghDev

Do you have plans to paint a Custom View in near future ? It would be a nice user experience.

abhinavtestbook avatar Sep 01 '20 11:09 abhinavtestbook

Not for this library, should be a responsibility for each app to implement fast scrolling in the desired way, and handle its own custom views :)

voghDev avatar Sep 01 '20 12:09 voghDev