License Management

Managing the license

PDFix SDK licensing, also known as a standard license, is handled by the SDK using a PsStandardAuthorization object.

Standard License Activation

Software can be authorized using an activation key. After activating the software operates on the computer according to the license.

Online Activation

Software can be activated using an activation key. Once activated, the software operates under the assigned license on the respective computer.

Command-line usage:

$ ./pdfix_app license --activate XXXX-XXXX-XXXX-XXXX

Using the code:

GetPdfix().GetStandardAuthorization().Activate("XXXX-XXXX-XXXX-XXXX")

Code example: c++c#Python

Note to PHP users: Depending on the configuration the PHP may operate in a safe mode under a virtual user (e.g. www-data). In such a case the license should be activated separately with PHP.

Offline activation

Step 1: Create activation request file

Command-line usage:

./pdfix_app license --activate XXXX-XXXX-XXXX-XXXX --request --license-path license.req

Using the code:

GetPdfix().GetStandardAuthorization().CreateOfflineActivationFile("XXXX-XXXX-XXXX-XXXX", "path/to/license.req")

Code examples:

Step 2: Upload the license.req file to PDFix Offline Licensing to generate a license activation file. You receive a license.lic upon submission and follow to the next step.

Step 3: Activate the license from file Command-line usage:

./pdfix_app license --activate XXXX-XXXX-XXXX-XXXX --license-path license.lic

Using the code:

GetPdfix().GetStandardAuthorization().ActivateOffline("path/to/license.response")

Code examples:

Deactivating the standard license

Note: When transferring a license to another computer, it must first be deactivated.

Online deactivation

Command-line usage:

$ ./pdfix_app license --deactivate

Code example: c++

Offline deactivation

Using the CLI:

$ ./pdfix_app license --deactivate --license-path deactivate.req

Using the code:

GetPdfix().GetStandardAuthorization().Deactivate()

Code example: c++Python

Updating the standard license

The license is updated automatically when running the software. When an instant update is needed the following command should be executed:

Command-line usage:

$ ./pdfix_app license --update

Using the code:

GetPdfix().GetStandardAuthorization().Update()

Code example: c++

Reading the license status

Users can read the license status anytime using special commands. The license status is provided as a JSON file.

Command-line usage:

$ ./pdfix_app license --status

Using the code:

GetPdfix().GetStandardAuthorization().SaveToStream(mem_stm, kDataFormatJson)

Code example: Python

The example status:

{
    "product": {
        "name": "PDFix SDK",
        "option": "Enterprise",
        "version": "8.4.0"
    },
    "status": {
        "authorized": "true"
    },
    "license": {
        "type": "standard",
        "active": "true",
        "key": "XXXX-XXXX-XXXX-XXXX",
        "max_activations": "5",
        "total_activations": "2",
        "days_remaining": "51",
        "expired": "false",
        "expiration_date": "2024-01-09",
        "days_since_last_check": "1",
        "pages": {
            "type": "2",
            "max_consumption": "30000",
            "total_consumption": "3024",
            "local_consumption": "5"
        },
        "enterprise": {
            "type": "1"
        }
    }
}

Local License File Storage

The activated license information is stored on computer under the current user account. The default local license storage is in the following directories:

  • Windows: <user>\AppData\Local\.pdfixsdk
  • MacOS: <user>/Library/Application Support/.pdfixsdk
  • Linux: <user>/.pdfixsdk

Custom location can be set by setting the license data path and file name in the settings JSON as follows:

{
    "user": {
        "license_data_path" : "<local_folder>",
        "license_file_name" : "MyLicenseLey.txt"
    }
}

Command-line usage:

$ ./pdfix_app [SUBCOMMAND] [OPTIONS] --settings-path <path_to_json>