Skip to content

Trial and Licensing

Trial evaluation

Developers can apply for a trial or download instructions via the Foxit Developer Hub, download the Foxit PDF SDK trial for evaluation, or contact Foxit technical support and sales. Trial functionality matches the standard licensed edition, with these limits:

  • Trial period: 30 days.
  • Generated PDF pages include a trial watermark.

After the trial, contact Foxit sales to purchase a license if you wish to continue using Foxit PDF SDK.

WARNING

Without authorization from Foxit Software Inc., you may not distribute any documentation, sample code, or source code from the Foxit PDF SDK package to third parties.

License and SDK initialization

Before calling any SDK API, your application must initialize the Foxit Conversion SDK library with a valid license. Trial license files are in the package lib directory as **_sn.txt and **_key.txt.

Initialization steps:

  1. Obtain license values:

    • sn comes from the string after SN= in **_sn.txt.
    • key comes from the string after Sign= in **_key.txt.
  2. Call the initialize function:

    • Call Library.initialize(sn, key) with those values.

Example code:

C++
const char* sn = " ";
const char* key = " ";
foxit::ErrorCode code = Library::Initialize(sn, key);
if (code != foxit::e_ErrSuccess) {
return FALSE;
}
java
// Load the library.
// You can also use System.load("filename") instead. The filename argument must be an absolute path name.
static {
    String os = System.getProperty("os.name").toLowerCase();
    String lib = "fpdfconversionsdk_java_";
    if (os.startsWith("win")) {
        lib += "win";
    } else {
        lib += "linux";
    }
    if (System.getProperty("sun.arch.data.model").equals("64")) {
        lib += "64";
    } else {
        lib += "32";
    }
    System.loadLibrary(lib);
}

// Initialize the library.
int error_code = Library.initialize("sn", "key");
if (error_code != e_ErrSuccess) {
return;
}
C#
string sn = " ";
string key = " ";
ErrorCode error_code = Library.Initialize(sn, key);
if (error_code != ErrorCode.e_ErrSuccess)
{
   return;
}
js
var sn = " ";
var key = " ";

var error_code = Library.Initialize(sn, key);
if (ErrorCode.e_ErrSuccess != error_code) {
  if (ErrorCode.e_ErrInvalidLicense == error_code)
    console.log("[Failed] Current used Foxit PDF Conversion SDK key information is invalid.");
  else
    console.log("Library Initialize Error: %d", error_code);
  return;
}
py
sn = " "
key = " "
if __name__ == '__main__':
    code = Library.Initialize(sn, key)
    if code == e_ErrSuccess: 
        main()
    Library.Release()
go
import (
    . "foxit.com/fpdfconversionsdk"
)
const(
sn = " "
key = " "
)
func main(){
    code := LibraryInitialize(sn, key)
    if code == E_ErrSuccess{
        function()
    }
    LibraryRelease()
}