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.
The open-source Vue 3 UI layer of the ComPDFKit Web SDK. View, annotate, edit, and sign PDF documents in the browser — fully customizable.
ComPDFKit WebViewer UI is the open-source UI layer that sits on top of the ComPDFKit Web SDK Core engine. It is built with Vue 3, Pinia, and Vite, and ships as a complete, responsive, customizable interface for working with PDF documents in the browser.
The repository contains the full source of the default UI. You can customize it, extend it, or use it as a reference for building your own PDF viewer interface.
Integrator's page
└─ webviewer.js (iframe embed, packages/core/webviewer.js)
└─ Webview Vue app (packages/webview)
└─ Core bridge (packages/webview/src/core/)
└─ ComPDFKitViewer (packages/core) ← Web Worker + WASMThe Core engine (@compdfkit/core) is a closed-source WASM binary. The UI layer (@compdfkit/webview) documented here is open source.
pnpm install
pnpm dev # dev server on http://localhost:3032Embed the viewer in your own page:
import ComPDFKitViewer from '@compdfkit/core/webviewer';
ComPDFKitViewer.init(
{ path: '/lib', pdfUrl: '/files/sample.pdf', license: 'YOUR_LICENSE_KEY' },
document.getElementById('viewer')
).then(instance => {
const { UI, Core } = instance;
UI.setLanguage('en'); // Localization
UI.setTheme('dark'); // Theming
UI.disableElements(['printButton', 'downloadButton']); // Hide toolbar buttons
});See Getting Started.
src/core/ facade over the engine.setHeaderItems, setToolbarGroup, toolbar groups.addPanel, setPanels, getPanels.openElement, closeElement, disableElements, enableElements.setTheme, setCustomStyle.setLanguage, addLanguage, supported locales.addCustomModal.annotationPopup, textPopup, contentEditorPopup, cropPagePopup.setActiveTool, registerTool.instance.UI / instance.Core surface.packages/
├── core/ # Closed-source engine → builds into webview/lib/
└── webview/ # Open-source UI layer (this documentation)
└── src/
├── apis/ # Public API surface (~67 modules → window.instance.UI)
├── api_helpers/ # API utilities (encapsulated store, popup API)
├── core/ # Stateless bridge to the engine (~120 modules)
├── components/ # Vue UI components (~200+ .vue files)
├── stores/ # Pinia stores (viewer, document)
├── helpers/ # Utilities (device, i18n, popup position, …)
├── hooks/ # Vue composables
├── constants/ # dataElements, toolNames, panel registries
└── locales/ # i18n translation files