Trial and Licensing
Trial evaluation
Developers can request a trial or download instructions from the Foxit Developer Hub, or contact Foxit technical support and sales. The trial has the same features as the licensed product, with these limits:
- Trial period: 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 must 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, the app must initialize the Foxit PDF SDK library with a valid license serial number and key. Trial license files are in the libs directory of the development package: rdk_sn.txt and rdk_key.txt.
Initialization steps:
Obtain the license values:
sn— the string afterSN=inrdk_sn.txt.key— the string afterSign=inrdk_key.txt.
Call the initialization API:
Use the
snandkeyvalues with the static method+[FSLibrary initialize:key:]. After successful initialization, you can call other SDK APIs.
Example:
objc
#import <FoxitRDK/FSPDFObjC.h>
// sn from rdk_sn.txt (string after "SN=")
// key from rdk_key.txt (string after "Sign=")
NSString *sn = @"xxx";
NSString *key = @"xxx";
FSErrorCode eRet = [FSLibrary initialize:sn key:key];
if (eRet != FSErrSuccess) {
// Initialization failed — verify sn / key
return;
}Release SDK resources
When the app no longer needs the SDK (for example in applicationWillTerminate:), call +[FSLibrary destroy] to release resources:
objc
[FSLibrary destroy];NOTE
- Close all open documents before calling
[FSLibrary destroy]. - If you use UI Extensions,
UIExtensionsManagercloses documents and releases the SDK on teardown; you usually do not need to call this manually.