Trial and Licensing
Trial Evaluation
Developers can request a trial or download instructions from the Foxit Developer Hub to evaluate Foxit PDF SDK for Android, or contact Foxit technical support and sales. The trial edition has the same features as a licensed edition, with these limitations:
- The trial period is 30 days.
- Generated PDF pages include a trial watermark.
When the trial ends, contact Foxit sales to purchase a license if you wish to continue using Foxit PDF SDK.
WARNING
Without authorization from Foxit Software Incorporated, you may not distribute any documentation, sample code, or source code from the Foxit PDF SDK package to third parties.
License and Initialize the SDK
Before calling any SDK API, your application must initialize the Foxit PDF SDK library with a valid license. Trial license files are in the libs directory of the development package and include rdk_sn.txt and rdk_key.txt.
Initialization steps:
Obtain license values:
- The
snparameter is the string afterSN=inrdk_sn.txt. - The
keyparameter is the string afterSign=inrdk_key.txt.
- The
Call the initialization API:
Use the
snandkeyvalues with the static methodLibrary.initialize(sn, key). After successful initialization, you can call other SDK APIs.
Example:
java
import com.foxit.sdk.common.Constants;
import com.foxit.sdk.common.Library;
// sn: from rdk_sn.txt (string after "SN=")
// key: from rdk_key.txt (string after "Sign=")
String sn = "xxx";
String key = "xxx";
int errorCode = Library.initialize(sn, key);
if (errorCode != Constants.e_ErrSuccess) {
// Initialization failed — verify sn / key
return;
}Release SDK Resources
When your app no longer needs the SDK (for example in Activity.onDestroy()), call Library.release() to free SDK resources:
java
Library.release();NOTE
- Before calling
Library.release(), close all open documents (PDFDoc.close()). - If you use UI Extensions,
UIExtensionsManagertypically closes documents and releases the SDK on destroy, so you usually do not need to call these manually.