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.
This sample shows how to do a full document search and highlight keywords
// Import the JS file of ComPDFKit Web Demo.
import ComPDFKitViewer from "@compdfkit_pdf_sdk/webviewer";
const viewer = document.getElementById('webviewer');
ComPDFKitViewer({
path: '/',
initialDoc: 'Your PDF Url',
licenseKey: 'Input your license here'
}, viewer)
.then((instance) => {
const { documentViewer } = instance.Core;
documentViewer.addEventListener('documentLoaded', () => {
console.log('ComPDFKit Web Demo loaded');
})
// Sample: Search and highlight relevant matches
instance.UI.searchTextFull(value);
})