public final class

PSPDFKitInstant

extends Object
java.lang.Object
   ↳ com.pspdfkit.instant.PSPDFKitInstant

Class Overview

Main PSPDFKit Instant entry point. Use initialize(Context, String) to initialize the library.

Summary

Constants
String VERSION String version of Instant library.
Public Methods
synchronized static void initialize(Context context, String licenseKey)

Initializes PSPDFKit Instant with a license key.

synchronized static boolean isInitialized()
Returns true if PSPDFKit Instant is initialized and ready to use.
synchronized static void release(Context context)

Releases PSPDFKit Instant library and all associated caches from memory.

[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String VERSION

String version of Instant library.

Constant Value: "5.3.1-96748-gdbd012a"

Public Methods

public static synchronized void initialize (Context context, String licenseKey)

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

This method can safely be called multiple times.

Parameters
context Application context.
licenseKey PSPDFKit license key.
Throws
InvalidPSPDFKitLicenseException If license is not valid for this app.
PSPDFKitInitializationFailedException If current device isn't compatible with PSPDFKit (e.g. Android < 4.4 or wrong ABI) or if some other error occurred.
MissingDependencyException If any dependencies are missing in the containing app.

public static synchronized boolean isInitialized ()

Returns true if PSPDFKit Instant is initialized and ready to use.

Returns
  • true if PSPDFKit Instant was initialized.

public static synchronized void release (Context context)

Releases PSPDFKit Instant library and all associated caches from memory.


BE WARNED: After this call all existing PdfDocument instances WILL be invalid and calling methods on them will result in a crash.

Parameters
context Application context.