PDF Signature Workflow API Migration Guide ​
Why this changed ​
From version 11.0.0, Foxit PDF SDK for Web refactored signing and verification APIs for greater flexibility, extensibility, and custom UI support. The new design centralizes workflow entry points and supports deep customization of signing UI, improving integration across varied business scenarios.
Main changes ​
API layer ​
- Previous:
PDFUI.registerSignatureFlowHandlerandPDFUI.setVerifyHandlercustomized signing and verification. - Current:
SignatureWorkflowServicemanages signing workflows, signer policies, and workflow overrides. - Current:
SignatureService.setVerifyHandlersets a global verification handler used for manual verification and JavaScript Action–triggered verification.
Custom signing workflows ​
overrideSigningWorkflow and overrideVerifyWorkflow let you fully customize signing and verification.
Signer display policy ​
setSignerOverridePolicy customizes how signer names appear in the UI.
UI customization ​
From 11.0.0, implement IViewerUI and related interfaces (ISignatureUI, ISignDocDialog, ISignVerifiedResultDialog, ISignedSignaturePropertiesDialog, and others) to customize signing, verification, and property dialogs. Inject your implementation when initializing PDFViewer.
Migration mapping ​
API mapping ​
| Previous API | New API / usage | Notes |
|---|---|---|
PDFUI.registerSignatureFlowHandler({sign:()=>Promise.resolve(...)}) | SignatureWorkflowService.overrideSigningWorkflow | Override signing workflow |
PDFUI.registerSignatureFlowHandler({verify:()=>Promise.resolve(...)}) | SignatureWorkflowService.overrideVerifyWorkflow | Override verification workflow |
PDFUI.registerSignatureFlowHandler({showVerificationInfo: ()=>Promise.resolve(...)}) | ISignatureUI#getSignVerifiedResultDialog | Custom verification result UI |
PDFUI.registerSignatureFlowHandler({showSignatureProperty: ()=>Promise.resolve(...)}) | ISignatureUI#getSignVerifiedResultDialog | Custom signed signature properties UI |
PDFUI.registerSignatureFlowHandler({getSigner: ()=>Promise.resolve(...)}) | SignatureWorkflowService#setSignerOverridePolicy | Override signer name (UI display only) |
PDFUI.setVerifyHandler | SignatureService.setVerifyHandler | Custom verification logic |
Workflow code migration ​
Custom signing workflow
Previous:
jspdfui.registerSignatureFlowHandler({ sign: (field) => { // Return custom signature settings } })Current:
jsservice.overrideSigningWorkflow(async (field) => { // Return custom signature settings });Custom verification workflow
Previous:
jspdfui.registerSignatureFlowHandler({ verify: (field) => { // Return verification result } })Current:
jsservice.overrideVerifyWorkflow(async (signature) => { // Return verification result });
UI migration example ​
Previous
jspdfui.registerSignatureFlowHandler({ showVerificationInfo: field => { // Show verification info }, showSignatureProperty: field => { // Show signature properties } })Current
jsclass CustomSignatureUI implements ISignatureUI { async getSignDocumentDialog() { /* ... */ } async getSignVerifiedResultDialog() { /* ... */ } async getSignedPropertiesDialog() { /* ... */ } } class CustomViewerUI extends PDFViewCtrl.TinyViewerUI { async getSignatureUI() { return new CustomSignatureUI(); } } new PDFViewer({ viewerUI: new CustomViewerUI(), // Other options... });
Notes ​
- New APIs require Foxit PDF SDK for Web 11.0.0 or later.
- When customizing UI, implement interfaces as documented and handle async work and resource cleanup.
- Previous APIs are deprecated from 11.0.0; migrate to the new APIs as soon as possible.
For API details and more examples, see: