As part of Qoppa’s Android toolkit, there is also a class included called QPDFNotesView that extends an Android View. This class can be used within your application to show PDF documents and also provides annotation tools, similar to our qPDF Notes app.

Our Android View QPDFNotesView can:

  • Display PDF documents
  • Review and annotate PDFs
  • Digitally Sign PDFS
  • Fill Interactive PDF Forms Also includes an PDF Form Fill Activity for efficient interactive form filling in Android SDK.
  • Here is a sample activity that uses the view:

    public class ViewSample extends Activity {
      public void onCreate(Bundle saveInstBundle) {
        super.onCreate(saveInstBundle);
     
        QPDFNotesView viewer = new QPDFNotesView (this);
        viewer.setActivity(this);
     
        setContentView(viewer);
      }
    }

    A couple of tips:

    – The application toolbar can be accessed with QPDFNotesView.getToolbar(). It can be customized with things like:

    QPDFNotesView.getIbOpen().getParent().remove(QPDFNotesView.getIbOpen());

    – You can prevent the Views from being destroyed on device rotation by adding this to your activity’s tag in your AndroidManifest.xml:

    android:configChanges=”keyboardHidden|orientation|keyboard”

    – Also, you can forward the configuration event to QPDFViewerView and it will restore the previous scroll location by adding this to your activity:

    @Override
    public void onConfigurationChanged(Configuration newConfig) {
      super.onConfigurationChanged(newConfig);
      m_Notes.onConfigurationChanged(newConfig);
    }