Adedoyin Akande
Adedoyin Akande

Reputation: 2569

Function to Goto a Page in PDFViewer

I use PdfViewer Is there a function to goto a page ?

Upvotes: 1

Views: 2855

Answers (4)

Prashant Kumar
Prashant Kumar

Reputation: 81

this may help you if u want to go on next or previus page in pdf

   public void next(View v){

     pdfView.jumpTo(pdfView.getCurrentPage()+1);//getCurrentPage method will 
     //return current page in int

   }

   public void back(View v){
     pdfView.jumpTo(pdfView.getCurrentPage()-1);
   }

Note, you can also pass boolean value which is of animation in jumpTo method after first parameter

Upvotes: 3

abubakar khan
abubakar khan

Reputation: 11

pdfView.jumpTo(int pagenumber,true); It works with second argument "true" which is withanimation.

Upvotes: 1

Adedoyin Akande
Adedoyin Akande

Reputation: 2569

After thorough searching and going through the documentation

pdfView.jumpTo(int page)

Does the magic.

Upvotes: 9

Albert-Jan
Albert-Jan

Reputation: 315

I just checked out the first version of the library and there I found this function:

pdfView.fromAsset(String)
.defaultPage(1)
.load();

It might also exist in the second version.

https://github.com/barteksc/AndroidPdfViewerV1

Upvotes: 2

Related Questions