PSPDFKit 2.1 Migration Guide

Prior to version 2.1, there were two different PSPDFKit activities: PSPDFActivity and PSPDFAppCompatActivity. Each of these had two different base classes, FragmentActivity and AppCompatActivity, respectively. Version 2.1 simplifies activities by only having a single PSPDFActivity that extends AppCompatActivity.

Below you’ll find the steps for migrating your app to PSPDFKit 2.1 for Android.

  • Replace pspdfkit-2.0.x.aar with pspdfkit-2.1.aar.

  • If you have a custom PSPDFKit activity, let it extend com.pspdfkit.ui.PSPDFActivity.

  • Inside the AndroidManifest.xml:

    1. Use your custom activity or the default com.pspdfkit.ui.PSPDFActivity.

    2. Use an activity theme that extends Theme.AppCompat (important!).

The manifest entry should look similar to this:

<activity android:name="com.pspdfkit.ui.PSPDFActivity"
          android:theme="@style/Theme.AppCompat.Light.DarkActionBar"
          android:windowSoftInputMode="adjustNothing" />