Skip to content

Android library for viewing pdf files based on Mozilla's PDF.js library

License

Notifications You must be signed in to change notification settings

truefedex/APDFJS

Repository files navigation

APDFJS

Simple Android library (webview based) for viewing pdf files using Mozilla's PDF.js library for wieving local pdf files.

Demo

Usage

Step 1. Add the JitPack repository to your build file

Add it in your root build.gradle at the end of repositories:

allprojects {
  repositories {
    ...
    maven { url 'https://jitpack.io' }
  }
}

Step 2. Add the dependency

dependencies {
	compile 'com.github.truefedex:APDFJS:v1.0.4'
}

Now add widget to your layout:

<com.github.truefedex.apdfjs.PDFJSView
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:id="@+id/apdfjs"/>

And use simple api:

PDFJSView apdfjs = (PDFJSView)findViewById(R.id.apdfjs);
apdfjs.loadFromAssets("compressed.tracemonkey-pldi-09.pdf");

Stuff used to make this:

  • PDF.js for displaying pdf in webview

About

Android library for viewing pdf files based on Mozilla's PDF.js library

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages