PSPDFKit ships with a few projects containing a lot of examples to help you with your code. You can find these projects in the
example folder of the
.zip file you downloaded from your customer portal or in the demo download.
What follows is a rundown of the example projects and what they contain.
This app contains a lot of examples on how to use PSPDFKit in your project. It also shows some high-level use cases, like the
ScreenReaderExample. To build the Catalog app, open the
example/catalog/ folder within Android Studio and press Run.
The Catalog app contains examples for:
- Loading documents from various sources (app assets, resources, content providers, memory…)
- Using the
PdfFragmentin custom barebone activities
- UI customizations (activities, toolbars, layouts…)
- Activity styling/theming
- Accessing annotations from code
- Multimedia embedding
- Annotation processing with the
- Full-text search
- …and lots of other use cases.
💡 Tip: You can use the External Document example to open any document from your device or from available document providers (e.g. Dropbox or Google Drive).
This example app (inside
example/simple/) shows the minimum code required to start building an app with PSPDFKit. You can simply copy this project to your working space and use it as a template for your app.