Signatures
The WebViewer supports both electronic signatures (drawn/typed/uploaded) and digital signatures (certificate-based). This guide covers the UI-side signature APIs and components.
Signature cryptography and PDF integration live in the closed-source Core engine. The UI layer drives them through the core bridge and mirrors signature state in the viewer and document stores.
UI APIs
Enable / disable the signature tool
UI.enableSignatureTool(); // useViewer.setDisableSignatureTool(false)
UI.disableSignatureTool(); // useViewer.setDisableSignatureTool(true)Auto-jump
UI.setAutoJumpNextSign(true); // useDocument.setAutoJumpNextSign(!!value)When enabled, the viewer auto-jumps to the next signature field after one is signed.
Signature dialog configuration
UI.setSignatureDialogTabs(['keyboard', 'trackpad']); // tabs shown in the dialog
UI.setEnableSignatureTemplates(true); // enable signature templates
UI.setSignatureDialogProperties('keyboard', { color: '#000000', lineWidth: 2 }, false);| API | Store action | Purpose |
|---|---|---|
setSignatureDialogTabs(value) | useViewer.setSignatureDialogTabs | Configure the tabs shown in the signature dialog. |
setEnableSignatureTemplates(value) | useViewer.setEnableSignatureTemplates | Enable/disable signature templates (the "mySignatures" list + create tabs). |
setSignatureDialogProperties(type, properties, replace=false) | useViewer.setSignatureDialogProperties | Set properties (color, font, lineWidth) for a dialog type (KEYBOARD/TRACKPAD). replace replaces vs. merges. |
Signature state (viewer store)
| Field | Purpose |
|---|---|
signatureDialogTabs | Tabs shown in the signature dialog. |
signatureDialogProperties | Per-tab properties (KEYBOARD/TRACKPAD colors, fonts, lineWidth). |
enableSignatureTemplates | Whether templates are enabled. |
disableSignatureTool | Whether the signature tool is disabled. |
digitalSignature | { preview, certSubject }. |
selectedSignatureField | The currently selected signature field. |
electronicSignaturesList / digitalSignaturesList | Saved signature lists (persisted to localStorage). |
The document store holds signatures[], selectedSignature, trustedCertificateLists[], pkcs12, disableDigitalSignature, disableElectronicSignature, autoJumpNextSign.
Signature components
SignCreatePanel.vue(components/Signatures/) — full-screen electronic signature creation/management panel. Two tabs when templates are enabled: "mySignatures" list and "create" (keyboard / trackpad / upload-image sub-tabs). Toggled viauseViewer.isElementOpen(SIGN_CREATE_PANEL).SignCreateDialog.vue— dialog variant of the signature creator, toggled viaSIGNATURE_DIALOG.DigitalSignCreatePanel.vue/DigitalKeyboardCreatePanel.vue— digital signature creation (certificate / keyboard input).SignatureContainer.vue(components/SignatureContainer/) — left-panel signature tab content.SignatureToolBar— sign-mode toolbar.
Related dialogs: SelectSignTypeDialog, SignatureAppearanceDialog, SignatureDetailsDialog, DeleteSignatureDialog, AddDigitalFileDialog, CertificationViewerDialog.
Core bridge (signature surface)
The core bridge exposes on instance.Core:
| Function | Purpose |
|---|---|
handleSign | Apply a signature. |
getSignature / deleteSignature | Get / delete a signature. |
verifySignature / getVerificationResult | Verify a signature. |
loadCertificates / addToTrustedCertificateLists | Certificate management. |
checkCertificateIsTrusted | Trust check. |
setAutoJumpNextSign | Auto-jump (engine side). |
Examples
Enable the signature tool and auto-jump
UI.enableSignatureTool();
UI.setAutoJumpNextSign(true);Configure the signature dialog
UI.setSignatureDialogTabs(['keyboard', 'trackpad', 'upload']);
UI.setSignatureDialogProperties('keyboard', { color: '#0000ff', lineWidth: 3 });
UI.setEnableSignatureTemplates(true);Open the signature creation panel
UI.openElement('signCreatePanel');Related
- Forms — signature fields.
- Stamps — stamp annotations.
- Core Bridge
- API Reference