Android pdf reader

前端 未结 3 944
野趣味
野趣味 2021-01-13 13:34

I want to use Android pdf library http://andpdf.sourceforge.net/, but i have same error. Log:

 ST=\'file \'no file selected\' not found\'
 ST=\'reading page          


        
相关标签:
3条回答
  • 2021-01-13 14:10

    With PdfViewPager you can load and display PDF files easily. All the code you need is:

    PdfViewPager pdfViewPager = new PDFViewPager(this, "sample.pdf");
    setContentView(pdfViewPager);
    

    Or you can embed it in your layout like this:

    <es.voghdev.pdfviewpager.library.PDFViewPager
      android:id="@+id/pdfViewPager"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      app:assetFileName="sample.pdf"/>
    

    Have a look at the lib if you want to know more.

    0 讨论(0)
  • 2021-01-13 14:17

    Now we have this awesome library for PDF viewing:

    https://github.com/JoanZapata/android-pdfview

    It is really simple to use and has a lot of features:

    Android PDFView is a library which provides a fast PDFView component for Android, with animations, gestures, and zoom. It's based on VuDroid for decoding the PDF file.

    Just include the view in your XML and use it as follows:

    pdfView.fromAsset(pdfName)
        .pages(0, 2, 1, 3, 3, 3)
        .defaultPage(1)
        .showMinimap(false)
        .enableSwipe(true)
        .onDraw(onDrawListener)
        .onLoad(onLoadCompleteListener)
        .onPageChange(onPageChangeListener)
        .load();
    
    0 讨论(0)
  • 2021-01-13 14:32

    Here some Google Code has some nice source code for reading pdf in android.

    Link1

    Link2

    an awesome example

    Link 4

    Link 5

    0 讨论(0)
提交回复
热议问题