Comprehensive Guide for Developers: UI & SDK Integration, Configuration, and API Reference
OptionalapiHow calls to apiToolsUrl are authenticated. Defaults to 'apiKey'.
OptionalapiWebhooks the API calls when it finishes a job in the background, sent as the X-Callback-Url
header. Set them to let long jobs outlive the session: when the API cancels an OCR or
Translate run for exceeding its time limit, the viewer re-submits it with this header — which
runs the job with no time limit — tells the user the work continues in the background, and the
API reports the finished (or failed) document to your endpoint, where your backend mails it
out. See
IApiCallbackUrlsConfig for why each tool needs its own URL.
OptionalapiExtra HTTP headers merged into every call to apiToolsUrl, applied after the
apiAuthMode auth header so these can override it. Only needed by integrators who
route these calls through their own infrastructure via apiToolsUrl — e.g. to attach a
gateway token or a tenant header.
Pass a plain object for static headers, or a function for values that can go stale (it is
called fresh before every request, and may return a Promise).
OptionalapiBase URL for the Avanquest Developers API (translate, OCR, convert). Defaults to 'https://api-developers.avanquest.com'.
OptionalbaseURL prefix under which the pwv-* static asset folders (worker, fonts,
i18n, cursors, stamps) are served, e.g. '/app' when hosting at
example.com/app/pwv-workers, example.com/app/pwv-fonts, etc.
Defaults to the domain root ('') - copy the package's public/pwv-*
folders there, or set this to match wherever you host them.
OptionalbrandingBranding customization (logo, colors, etc.).
OptionalcontainerDOM element to render the editor into.
OptionalcustomHost-owned storage sources ("bring your own cloud"), shown on the empty ("home") screen as extra tabs next to "Recents" and the built-in drives.
Each entry is always visible and needs no sign-in — the host app already
knows the user — and its body is a folder browser with a breadcrumb, driven
by ICustomFilesProvider.listFolder. Entries with a missing/duplicate
id or non-callable listFolder/getFileAsFile are skipped with a console
error. Hide them all with layoutConfig.chooseFile.customProviders: false.
OptionaldefaultDefault font configuration.
OptionaldefaultInitial zoom/fit mode applied to every document on open (unless the open call specifies its own). Defaults to PdfPageView.fitWidth on narrow viewports (<1024px) and PdfPageView.fitPage otherwise.
Optionaldevice"This device" as a save target. It works without this — the document leaves through the export (ISetupOptions.onExportFile) unless this config implements the writing. See IDeviceConfig.
OptionaldisableDisable default notifications.
OptionaldropboxDropbox integration. When defined with a clientId (Dropbox app key), the
viewer shows a "Dropbox" card on the empty ("home") screen; the end user
connects their Dropbox account and the card lists their recent Dropbox PDFs
and lets them browse folders. Clicking a file opens it in the clicked pane.
See IDropboxConfig.
OptionalgoogleGoogle Drive integration. When defined with a clientId, the viewer shows
a "Google Drive" card on the empty ("home") screen; the end user connects
their Google account and the card lists their recent Drive PDFs and lets
them browse folders. Clicking a file opens it in the clicked pane. See
IGoogleDriveConfig.
OptionalhideIf true, hides the tools panel on startup.
OptionalinitialInitial document to open upon initialization.
Note: The file property must be a valid File object.
OptionallanguageLanguage and localization settings.
OptionallayoutLayout customization options.
Your PDF Editor license key (required).
OptionalnetNetExplorer integration. When defined with a clientId and the customer's
platform domain, the viewer shows a "NetExplorer" card on the empty
("home") screen; the end user connects their NetExplorer account and the
card lists their files and lets them browse folders. Clicking a file opens
it in the clicked pane. See INetExplorerConfig.
OptionalocrOCR Advanced settings (Settings section and OCR pop-up Settings icon). See IOcrAdvancedConfig.available - hidden by default until you know which OCR module UM granted the signed-in user.
OptionalonCallback invoked once per discrete UI activity event — a tool activated, a dialog opened/closed, a header tab switched, a menu action invoked, and so on. Use it to feed the host's analytics. Events are structured (IActivityEvent) and delivered on a microtask; errors thrown by the callback are swallowed and never affect the viewer. When omitted, no tracking work is done at all (zero overhead).
OptionalonCallback when adding signature or initials.
OptionalonCallback when configuration changes.
OptionalonCallback invoked on right-click within the document, before the built-in
context menu opens. Receives the context menu type and the click position
relative to the document render element. Return true after showing your
own menu to suppress the default one; return false to fall back.
OptionaloneOneDrive (Microsoft Graph) integration. When defined with a clientId,
the viewer shows a "OneDrive" card on the empty ("home") screen; the end
user connects their OneDrive account and the card lists their recent
OneDrive PDFs and lets them browse folders. Clicking a file opens it in
the clicked pane. The library performs the OAuth flow itself using the
integrator-provided app credentials. See IOneDriveConfig.
OptionalonCallback when an error occurs.
OptionalonCallback invoked when an already-placed E-Sign field is double-clicked in
edit mode. Return true after handling the edit with your own UI to skip
the library's default behavior; return false to fall back.
OptionalonCallback invoked when an E-Sign field needs a signature-capture modal
(Signature / Initials / Certify / DigitalSignature). Return true after
applying the value yourself to skip the library's default dialog; return
false to fall back. Not invoked for in-place text editors (TextInput,
DropDown, Name, Company, Title, Email, Date) or click-toggles (CheckBox,
RadioButton).
OptionalonCallback invoked when the signer presses the E-Sign toolbar's Sign
button. Resolve with the signed File to plug in your own signing
service; resolve with null to cancel. Required-field validation runs
before this callback fires.
OptionalonEvery file the viewer hands over: the document on Download, and each generated artefact (converted file, extracted images, split or compressed result, attachment, form data, snapshot). One-way on purpose — it delivers a copy and reports nothing back.
Saving is not this: a save writes to a target and has to say whether it worked, which is
deviceConfig.saveOver / saveInto for the machine and the provider itself for a cloud.
The one overlap is the device's fallback: with no deviceConfig write methods, saving to
"This device" is an export, so it arrives here too.
claims lists every operation the file's contents went through — the source document's
own claims plus the one that produced this artefact, so a compressed export of an OCR'd
merge reports all three. Empty for a file with no document behind it (a stored signature
bitmap, a snapshot) and for a build whose core reports none.
OptionalonCallback when the user toggles the viewer's Fullscreen button, with the state they asked for. Set it when the viewer is drawn inside a window it cannot fill by itself — a desktop shell, an embedder with its own chrome — and the viewer stops calling the browser Fullscreen API altogether: put your window into that state, then report what it did through IDocumentViewerWrapperElement.setFullscreenLayout, which is what moves the UI.
OptionalonCallback when loading state changes.
OptionalonCallback to handle 'Open File' action.
OptionalonCallback invoked before each document operation. Return false to deny the operation.
OptionalonCallback when a password is required for a protected PDF.
OptionalonCallback when printing. claims lists the operations the printed contents went through, the
same list ISetupOptions.onExportFile receives — a print hands a copy of the document
over too.
OptionalonCallback invoked when the user requests to remove all signatures. Override to provide a custom confirmation dialog.
OptionalonCallback when a snapshot area is captured.
OptionalopenIf true (default), each opened document gets its own tab. If false, the new document replaces the current view.
OptionalopenExtra file formats the open UI should offer, on top of the ones the viewer reads itself. Only widens what the picker and the cloud listings let the user choose — opening such a file is yours to handle, via onOpenFile. See IOpenFormatsConfig for the built-in list and what happens to a declared format that is not converted.
OptionalrecentsStorage for the recent-documents history. The viewer keeps the history itself and shows it on the empty ("home") screen; this only makes it outlive a page reload. See IRecentsConfig.
OptionalrestoreIf true (default), reopening a document returns it to the page, zoom and layout it was last closed at — see IRecentEntry.viewState, which is where that is stored, and needs IRecentsConfig to survive a restart. If false, every document opens at the top. The reader can change this in Settings; persist the value from IConfigChangeData.restoreLastViewSettings and pass it back here to restore it.
OptionalsidebarStart the LayoutVariant.NAVIGATION_SIDEBAR rail collapsed to icons. Default false. The reader can change this from the rail's collapse button or in Settings > Appearance; persist the value from IConfigChangeData.sidebarCollapsed and pass it back here to restore it. Ignored by layouts that render no rail.
OptionalsidebarIf true, a collapsed rail peeks open while the pointer is over it, drawn over the document rather than pushing it. Default false — a collapsed rail stays collapsed until the reader expands it. The reader can change this in Settings > Appearance; persist the value from IConfigChangeData.sidebarExpandOnHover and pass it back here to restore it.
OptionalthemeTheme configuration (light/dark mode, colors).
OptionaltranslateTranslate workflow configuration.
OptionalunitsUnits and guides (ruler, grid) configuration.
OptionaluserCustom fonts to make available in the editor.
OptionaluserPre-defined initials for Fill & sign.
OptionaluserUser management configuration (login, logout, account URLs and user info).
OptionaluserDisplay name of the current user for annotations.
OptionaluserPre-defined signatures for Fill & sign.
Configuration options for initializing the PDF Editor.
Example