PDF Generation Template Editor
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
Open-source visual PDF generation engine with customizable templates and developer-friendly APIs.
If you haven't get a license key, please check out how to obtain a license key.
ComPDF SDK currently supports two authentication methods to verify license keys: online authentication and offline authentication.
Learn about:
What is the authentication mechanism of ComPDF's license?
What are the differences between Online Authentication and Offline Authentication?
Accurately obtaining the license key is crucial for the application of the license.
XML file containing the license key.

// Include the license in Flutter assets and copy to device storage
// Add `license_key_flutter.xml` to your Flutter project’s assets directory;
File licenseFile = await CPDFFileUtil.extractAsset(context, 'assets/license_key_flutter.xml');
await ComPDFKit.initWithPath(licenseFile.path);Alternative methods (optional)
// Android
// Copy the license_key_flutter.xml file into the `android/app/src/main/assets` directory of your Android project:
await ComPDFKit.initWithPath('assets://license_key_flutter.xml');
// iOS
// Copy the license_key_flutter.xml file into your iOS project directory (or a readable location):
await ComPDFKit.initWithPath('license_key_flutter.xml');