initialize

Initializes PSPDFKit with a license key. This must be called before any other call to methods in this class.

This method can safely be called multiple times and is not needed when using com.pspdfkit.ui.PdfFragment or com.pspdfkit.ui.PdfActivity.

Parameters

context

Application context.

options

Extra initialization options, for example license key string. See InitializationOptions. Use null for trial purposes.

Throws

If license is not valid for this app.

If current device isn't compatible with PSPDFKit (e.g. Android < 5.0 or wrong ABI) or if some other error occurred.

If RxAndroid or RxJava dependencies are missing in the containing app.


fun initialize(context: Context, licenseKey: String)

Helper for the main initialise method. Useful if you only want to initialise with a license key and want to leave other options as default.

Parameters

context

Application context.

licenseKey

A valid PSPDFKit license key.