Using the License Key in Other Languages

If you’re using PSPDFKit in a hybrid framework, you need to convert the licenses (which are provided in the form of Swift and Objective-C examples) to another language first. This article explains how to use the license key in other languages.

ℹ️ Note: To use PSPDFKit inside your hybrid project, you first need a valid license key. The license key can be obtained in the PSPDFKit Customer Portal (for existing customers), or by following the link inside the PSPDFKit demo email.

Obtaining the License Key

Our license integration guides explain how to integrate the license into an app that’s written in Swift or Objective-C. If you want to add the license in another programming language, here’s how to do it.

The license code you get from the customer portal or the demo email is similar to this:

PSPDFKit.SDK.setLicenseKey("PQmgAnmE1GsqwrY8nV2Gaq4g9wcg8XDF3p9ymbsw1npPclRg9Wsd3FQZXF2s4OT9BeiKk6g9sutdcy9032sgf8afm432wkq50SrGfi71CDuJCoVdIbF6Zj+BIYeaz38ghlFfydfMOFlfd4H5t0y")
[PSPDFKitGlobal setLicenseKey:@"PQmgAnmE1GsqwrY8nV2Gaq4g9wcg8XDF3p9ymbsw1npPclRg9Wsd3FQZXF2s4OT9BeiKk6g9sutdcy9032sgf8afm432wkq50SrGfi71CDuJCoVdIbF6Zj+BIYeaz38ghlFfydfMOFlfd4H5t0y"];

Using the License Key in Apache Cordova and Ionic

In Cordova and Ionic, you can set your license key like this:

PSPDFKit.setLicenseKey(
	'PQmgAnmE1GsqwrY8nV2Gaq4g9wcg8XDF3p9ymbsw1npPclRg9Wsd3FQZXF2s4OT9BeiKk6g9sutdcy9032sgf8afm432wkq50SrGfi71CDuJCoVdIbF6Zj+BIYeaz38ghlFfydfMOFlfd4H5t0y',
);

Using the License Key in Flutter

In Flutter, you can set your license key like this:

Pspdfkit.setLicenseKey("PQmgAnmE1GsqwrY8nV2Gaq4g9wcg8XDF3p9ymbsw1npPclRg9Wsd3FQZXF2s4OT9BeiKk6g9sutdcy9032sgf8afm432wkq50SrGfi71CDuJCoVdIbF6Zj+BIYeaz38ghlFfydfMOFlfd4H5t0y");

Using the License Key in React Native

In React Native, you can set your license key like this:

PSPDFKit.setLicenseKey(
	'PQmgAnmE1GsqwrY8nV2Gaq4g9wcg8XDF3p9ymbsw1npPclRg9Wsd3FQZXF2s4OT9BeiKk6g9sutdcy9032sgf8afm432wkq50SrGfi71CDuJCoVdIbF6Zj+BIYeaz38ghlFfydfMOFlfd4H5t0y',
);

Using the License Key in Xamarin

In Xamarin, you can set your license key like this:

PSPDFKitGlobal.SetLicenseKey("PQmgAnmE1GsqwrY8nV2Gaq4g9wcg8XDF3p9ymbsw1npPclRg9Wsd3FQZXF2s4OT9BeiKk6g9sutdcy9032sgf8afm432wkq50SrGfi71CDuJCoVdIbF6Zj+BIYeaz38ghlFfydfMOFlfd4H5t0y");