Adding a License Key for the MAUI SDK
PSPDFKit for MAUI is a commercial product, and it uses a license key to verify your copy against the package name or bundle ID you registered.
Alternatively, you can initialize the SDK in trial mode without a license.
Generating the License Key
To use a PSPDFKit license with your app, you have to generate a license key and bind it to the applicationId
bundle ID of your app.
-
Log in to the PSPDFKit Portal using the credentials you received when purchasing PSPDFKit. Go to the list of your purchased licenses.
-
Locate your license (e.g. MAUI for Windows) and select the button next to it. A dialog will open.
-
Enter the bundle ID of your production app. If you’re unsure about this step, please read our bundle ID guide first.
-
Confirm your selected bundle ID. Please double-check that the chosen identifier matches the one configured in your app, as it can no longer be changed once it’s been set.
Getting the License Key
-
Log in to the PSPDFKit Portal using the credentials you received when purchasing PSPDFKit. Go to the list of your purchased licenses.
-
Locate your license (e.g. MAUI for Windows) and click the license key button next to it. If there’s no such button, ensure you’ve already generated the license key.
-
A dialog will open showing you a code snippet with your license key.
-
After copying the license key to your project, the PSPDFKit SDK will be ready to use.
Adding the License Key
Adding the license key can be done when initializing a PDFView
. In XAML, when integrating the PDFView
control, you can use its License
property like so:
xmlns:pspdfkit="clr-namespace:PSPDFKit.Sdk;assembly=Sdk" <pspdfkit:PDFView License="{OnPlatform Android="YOUR_MAUI_ANDROID_LICENSE_HERE", iOS="YOUR_MAUI_IOS_LICENSE_HERE", MacCatalyst="YOUR_MAUI_MAC_CATALYST_LICENSE_HERE", WinUI="YOUR_MAUI_WINDOWS_LICENSE_HERE"}" />
Trial Mode
For the trial experience, you can initialize the SDK without a license. This can be done by omitting the License
property of the PDFView
in XAML:
xmlns:pspdfkit="clr-namespace:PSPDFKit.Sdk;assembly=Sdk" <pspdfkit:PDFView />
More information on trying PSPDFKit for MAUI — including a getting started guide — can be found on our trial page.