Some test text!

Search
Hamburger Icon

Android / Guides / Migrate from legacy viewer

Migrate to the New Viewer UI

If you have integrated the document viewer previously in your app (i.e. DocumentActivity or PdfViewCtrlTabHostFragment ), you can easily migrate to use the new UI with a couple of simple steps.

Prerequisites

  • Updated Apryse libraries to version 7.1.5 (see changelog for more info)

Migrate PdfViewCtrlTabHostFragment

  1. Update all references to ViewerBuilder to ViewerBuilder2. This new builder will create the new viewer fragment PdfViewCtrlTabHostFragment2, which contains the new UI.
  2. Update all references to PdfViewCtrlTabHostFragment to PdfViewCtrlTabHostFragment2 in your project.
  3. Update all references to PdfViewCtrlTabFragment to PdfViewCtrlTabFragment2 in your project.
  4. (Optional) If you have defined the CustomAppTheme style to customize your theme, you will need to change this style to extend PDFTronAppTheme and pass it into ViewerBuilder2 as described in our customize viewer theme guide.

Migrate DocumentActivity

  1. Remove any calls to DocumentActivity.openDocument(...).
  2. Then launch the activity using DocumentActivity.IntentBuilder as described in this guide.
  3. If you have defined the CustomAppTheme style to customize your theme, you will need to change this style to extend PDFTronAppTheme.

Trial setup questions? Ask experts on Discord
Need other help? Contact Support
Pricing or product questions? Contact Sales