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
Application context.
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.
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
Application context.
A valid PSPDFKit license key.
Deprecated
v2024.2: Will be removed in 2025.
Replace with
initialize(context, options: InitializationOptions?)
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
Application context.
PSPDFKit license key or null
for trial.
Additional paths to lookup fonts.
Specifies the Hybrid technology where PSPDFKit is supposed to be working on, or null
if PSPDFKit runs in a native Android project.
Deprecated
v2024.2: Will be removed in 2025.
Replace with
initialize(context, options: InitializationOptions?)
Initializes PSPDFKit with a license key. This must be called before any other call to methods in this class.
Parameters
Application context.
PSPDFKit license key or null
for trial.
Additional paths to lookup fonts.
Deprecated
v2024.2: Will be removed in 2025.
Replace with
initialize(context, options: InitializationOptions?)
Initializes PSPDFKit with a license key and a specific application policy. This must be called before any other call to methods in this class.
Parameters
Application context.
PSPDFKit license key or null
for trial.
Application policy.
Deprecated
v2024.2: Will be removed in 2025.
Replace with
initialize(context, options: InitializationOptions?)
Initializes PSPDFKit with a license key and a specific application policy. This must be called before any other call to methods in this class.
Parameters
Application context.
PSPDFKit license key or null
for trial.
Application policy.
Additional paths used to lookup fonts.