PDF-Reader for Local

2017-07-12  本文已影响0人  MagicLon

A fast PDF reader component for Android development        Share From Here

Android PDFView is a library which provides a fast PDFView component for Android, withanimations,gestures, andzoom. It's based onVuDroidfor decoding the PDF file.

Get it

Android PDFView is available in Maven Central

Or via gradle:

compile 'com.joanzapata.pdfview:android-pdfview:1.0.4@aar'

Include PDFView in your layout

<com.joanzapata.pdfview.PDFView
android:id="@+id/pdfview"
android:layout_width="match_parent"
android:layout_height="match_parent"/>

Load a pdf file

 .pages(0,2,1,3,3,3)  
 .defaultPage(1)  
 .showMinimap(false)   
 .enableSwipe(true)  
 .onDraw(onDrawListener)   
 .onLoad(onLoadCompleteListener)   
 .onPageChange(onPageChangeListener)  
 .load();

pagesis optional, it allows you to filter and order the pages of the PDF as you need

onDrawis also optional, and allows you to draw something on a provided canvas, above the current page

上一篇下一篇

猜你喜欢

热点阅读