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.
ComPDFKit PDF SDK currently supports two authentication methods to verify license keys: online authentication and offline authentication.
Learn about:
What is the authentication mechanism of ComPDFKit'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.
In the email you received, locate the XML file containing the license key.
Open the XML file, and determine the license type based on the <type> field. If <type>online</type> is present, it indicates an online license. If <type>offline</type> is present or if the field is absent, it indicates an offline license.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<license version="1">
<platform>web</platform>
<starttime>xxxxxxxx</starttime>
<endtime>xxxxxxxx</endtime>
<type>online</type>
<key>LICENSE_KEY</key>
</license><key>LICENSE_KEY</key> field. This is your license key.You can fill in the license with the key in the init function to apply the license key:
// Import the JS file of ComPDFKit Web Demo.
import ComPDFKitViewer from "@compdfkit_pdf_sdk/webviewer";
const viewer = document.getElementById('webviewer');
ComPDFKitViewer.init({
pdfUrl: 'Your PDF Url',
license: '<Input your license here>'
}, viewer)
.then((core) => {
const docViewer = core.docViewer;
docViewer.addEvent('documentloaded', () => {
console.log('Document Loaded');
})
})