How to Update PlugPDF on Android

Once you’ve downloaded the PlugPDF_Android.zip file from https://plugpdf.com/download/ you’ll notice it consists of two main folders: plugpdf and sample as well as the License_Key.html file.

The plugpdf project contains the core library files: libplugpdf.so and plugpdfcore.jar. There are also some java files supporting PDF viewing as well as some API methods accessing PDF contents.

The MainActivity project inside the sample folder is just an example which aims to explain how the whole thing works. It shows how you can initialize the PlugPDF SDK with your license key and link the PDF view class with the PDF files located in the assets folder.

When a new PlugPDF version is updated the items below may also be updated.

  1. PlugPdf Core Libraries
  2. Files in the plugpdf project
  3. Files in the MainActivity project

1. PlugPDF Core Libraries

PlugPDF’s core library files are modified in every update, so make sure to copy them into your project in every new PlugPDF update.

Copy the files libplugpdf.so and plugpdfcore.jar from the plugpdf/libs folder to your project’s libs folder. Additionally, it is also required to clean the project with the Project > Clean… menu option.

2. Files in the plugpdf project

There are seven java files in the plugpdf project showing the PDF viewing codes as well as the API methods to access PDF contents. These java files are changed very often, so if you edit or use them as superclasses please make sure to check the resulting differences between the old and the new versions.

plugpdf

  • AnnotSettingMenu.java – The Annotation setting menu can be modified.
  • OutlineAdapter.java – This is the Outline UI Processing class.
  • SimpleDocumentReader.java – A custom PDF viewer class can be created by using the PDFDocument class directly, and not using SimpleDocumentViewer at all.
  • SimpleDocumentReaderListener.java – The listener to be implemented which receives event notifications upon completion of PDF document loading.
  • SimpleReaderControlPanel.java – Class of the submenu that is activated in the menu when selecting that one which exists in the SimpleReaderControlView.
  • SimpleReaderControlView.java – This is the UI processing class with operations to be displayed for the user.
  • SimpleReaderFactory.java – You can create a custom PDF viewer class by using the PDFDocument class directly.

3. Codes in the MainActivity project

In MainActivity, the java files show how to initialize the PlugPDF SDK with a license key and link the PDF view class with the PDF files inside the project’s assets folder. These java files are changed when major features are updated.

sample

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *