Essential configuration options for initializing the PDF Web Viewer.
Your license key string.
const editor = await PdfEditor({
license: 'YOUR_LICENSE_KEY',
});
Path to the PDF worker script. Auto-detected if not provided (looks for /pwv-workers/).
const editor = await PdfEditor({
license: 'YOUR_LICENSE_KEY',
workerPath: '/custom-path/pwv-workers',
});
Path to the fonts directory. Auto-detected if not provided (looks for /pwv-fonts/).
const editor = await PdfEditor({
license: 'YOUR_LICENSE_KEY',
fontsPath: '/custom-path/pwv-fonts',
});
Path to translations directory. Auto-detected if not provided (looks for /pwv-i18n/).
const editor = await PdfEditor({
license: 'YOUR_LICENSE_KEY',
i18nPath: '/custom-path/pwv-i18n',
});
Path to stamps directory. Auto-detected if not provided (looks for /pwv-stamps/).
const editor = await PdfEditor({
license: 'YOUR_LICENSE_KEY',
stampsPath: '/custom-path/pwv-stamps',
});
DOM element where the viewer UI will be rendered. Required for full UI mode.
const editor = await PdfEditor({
license: 'YOUR_LICENSE_KEY',
container: document.getElementById('pdf-container'),
});
Hide toolbar and sidebar for minimal UI mode.
// Full UI mode (default)
const editor = await PdfEditor({
license: 'YOUR_LICENSE_KEY',
container: document.getElementById('pdf-container'),
hideToolsPanel: false,
});
// Minimal UI mode
const editor = await PdfEditor({
license: 'YOUR_LICENSE_KEY',
container: document.getElementById('pdf-container'),
hideToolsPanel: true,
});
URL for proxy server when loading external PDFs.
const editor = await PdfEditor({
license: 'YOUR_LICENSE_KEY',
proxyUrl: 'https://your-proxy-server.com/proxy',
});
const editor = await PdfEditor({
// Required
license: 'YOUR_LICENSE_KEY',
// Container for full UI
container: document.getElementById('pdf-container'),
// Asset paths (optional - auto-detected)
workerPath: '/pwv-workers',
fontsPath: '/pwv-fonts',
i18nPath: '/pwv-i18n',
stampsPath: '/pwv-stamps',
// UI mode
hideToolsPanel: false, // Full UI with toolbar and sidebar
// Network
proxyUrl: 'https://proxy.example.com',
});