Android SDK - Scroll jumping and page padding

Hi,

I'm using the Android SDK (version 6.5) with the tools library and I've got a PDF displaying with all the interactions, I am however having a couple of issues.

When I fling-scroll the pdf - so fast enough to continue scrolling after the screen is released - and the motion would take the pdf to either the very start or very end of the document, the scroll hangs just before the limit and then jumps the last distance. The distance before the edge the view jumps is related to the velocity of the scroll, the faster the scroll the further from the edge it jumps.

Is this a known bug? I would like the scroll to be smooth right up until the limit is hit.

Secondly I would like to add a gap between pages. There is a method on the view 'setPageSpacing' which can be used to do this. But it adds constant spacing, which is always the same size on screen regardless of zoom level. Is there a way to padding which changes size in relation to the zoom like the document does?

Thanks for any help you can provide,

Jon

Hi Jon,

  1. Is this referring to vertical or horizontal scrolling? Would it be possible if you could send us some additional information such as a short video demo on the issue?
    In addition, we are currently improving the horizontal scrolling that will enable smooth continuous horizontal sliding. As it is still in testing stage, if you are interested in trying it out early, please contact us via support for more information.

  2. You can multiple the base value with the zoom level (getZoom) to adjust the gap with current zoom. Could you give this a try?

Shirley Gong
Software Developer | PDFTron Systems, Inc.
sgong@pdftron.com | www.pdftron.com

Blog: blog.pdftron.com