Skip to content

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.registerSignatureFlowHandler and PDFUI.setVerifyHandler customized signing and verification.
  • Current: SignatureWorkflowService manages signing workflows, signer policies, and workflow overrides.
  • Current: SignatureService.setVerifyHandler sets 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 APINew API / usageNotes
PDFUI.registerSignatureFlowHandler({sign:()=>Promise.resolve(...)})SignatureWorkflowService.overrideSigningWorkflowOverride signing workflow
PDFUI.registerSignatureFlowHandler({verify:()=>Promise.resolve(...)})SignatureWorkflowService.overrideVerifyWorkflowOverride verification workflow
PDFUI.registerSignatureFlowHandler({showVerificationInfo: ()=>Promise.resolve(...)})ISignatureUI#getSignVerifiedResultDialogCustom verification result UI
PDFUI.registerSignatureFlowHandler({showSignatureProperty: ()=>Promise.resolve(...)})ISignatureUI#getSignVerifiedResultDialogCustom signed signature properties UI
PDFUI.registerSignatureFlowHandler({getSigner: ()=>Promise.resolve(...)})SignatureWorkflowService#setSignerOverridePolicyOverride signer name (UI display only)
PDFUI.setVerifyHandlerSignatureService.setVerifyHandlerCustom verification logic

Workflow code migration ​

  1. Custom signing workflow

    Previous:

    js
    pdfui.registerSignatureFlowHandler({
        sign: (field) => {
            // Return custom signature settings
        }
    })

    Current:

    js
    service.overrideSigningWorkflow(async (field) => {
        // Return custom signature settings
    });
  2. Custom verification workflow

    Previous:

    js
    pdfui.registerSignatureFlowHandler({
        verify: (field) => {
            // Return verification result
        }
    })

    Current:

    js
    service.overrideVerifyWorkflow(async (signature) => {
        // Return verification result
    });

UI migration example ​

  • Previous

    js
    pdfui.registerSignatureFlowHandler({
        showVerificationInfo: field => {
            // Show verification info
        },
        showSignatureProperty: field => {
            // Show signature properties
        }
    })
  • Current

    js
    class 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: