Nutrient

object Nutrient

Main Nutrient entry point. Use .initialize to initialize the library if you are not using the com.pspdfkit.ui.PdfActivity or the com.pspdfkit.ui.PdfFragment (which handle initialization on their own).

Properties

Link copied to clipboard
const val VERSION: String

String version of Nutrient library.

Functions

Link copied to clipboard

Add a AnalyticsClient to receive analytics events from Nutrient. This method will return true if the client was successfully added, or false if it was not added. Usually this happens if the client has already been added previously.

Link copied to clipboard

Clears pageBitmap memory cache to free memory.

Link copied to clipboard

Checks if Nutrient is initialized or throws NutrientNotInitializedException if not.

Link copied to clipboard
Link copied to clipboard

Gets all the LicenseFeature that are enabled with the current license.

Link copied to clipboard

Returns The FontManager giving you access to the system fonts.

Link copied to clipboard

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

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.

Link copied to clipboard

Returns true if Nutrient is initialized and ready to use.

Link copied to clipboard
fun isLocalFileUri(context: Context, uri: Uri): Boolean

Checks whether or not Nutrient can extract a local filesystem path from the uri. If this method returns true Nutrient can directly access the document on the filesystem, and can thus achieve faster loading speeds. If the method returns false, use .isOpenableUri to check whether Nutrient can still use the uri for document access.

Link copied to clipboard

Nutrient can only open URIs from content providers that also provide size information. This determines if the document is openable directly from that URI. Note that this will not check if file actually exists.

Link copied to clipboard

Releases Nutrient library and all associated caches from memory.

Link copied to clipboard

Remove a previously added AnalyticsClient from Nutrient. This method will return true if the client was successfully removed, or false if it was not removed. This usually happens if the client was not registered previously.

Link copied to clipboard

Sets application policy for the loaded library. Make sure the library is initialized before calling this method.

Link copied to clipboard

Sets a new LocalizationListener to help with localizing SDK framework strings. WARNING: The localization listener is retained globally, so make sure it does not refer to any Activity context or it WILL leak memory.

Link copied to clipboard

Sets a directory into which native code minidumps will be stored for debugging of native crashes. T he minidumps are stored in Google Breakpad format.