FoxitPDFSDKforWeb v11.1.0
Foxit PDF SDK for Web
SignatureWorkflowService Class Reference

This class is used to record the settings information required for signatures and custom verification handlers. The recorded information will be used in the SDK's built-in signature UI. More...

Public Member Functions

 addSignatureAPInfo (style:SignatureAppearanceInfo)
 Adds a new signature appearance information to the current appearance list. More...
 
 addSignerInfo (signerInfo:SignerInfo)
 Adds a new signer information to the current signer list. More...
 
 getSignatureAPInfoList ()
 Gets the current list of signature appearance information. More...
 
 getSignatureAPStyle ()
 Gets the default signature appearance style of the SDK's built-in signature UI. More...
 
 getSignerInfoList ()
 Gets the current list of signer information. More...
 
 overrideSigningWorkflow (signingWorkflowHandler:SigningWorkflowHandler)
 Overrides the default signing workflow for all signature fields. More...
 
 overrideVerifyWorkflow (verifyCallback:VerifyWorkflowHandler)
 Overrides the verify workflow for all signature fields. More...
 
 setSignatureAPStyle (style:SignatureStyleConfig)
 Sets the default signature appearance style for the SDK's built-in signature UI. More...
 
 setSignerOverridePolicy (verridePolicy:SignerOverridePolicy)
 Sets the override policy for the signer. More...
 

Detailed Description

This class is used to record the settings information required for signatures and custom verification handlers. The recorded information will be used in the SDK's built-in signature UI.

Since
11.0.0
See also
PDFUI.getSignatureWorkflowService

Member Function Documentation

◆ addSignatureAPInfo()

SignatureWorkflowService::addSignatureAPInfo (   style:SignatureAppearanceInfo)
inline

Adds a new signature appearance information to the current appearance list.

This appearance information will be used in the SDK's built-in signature UI.

Parameters
styleSignatureAppearanceInfo - The new signature appearance information to add.
Returns
void - Example:
const service = pdfui.getSignatureWorkflowService();
service.addSignatureAPInfo({
title: 'Default Style',
distinguishName: 'e=foxitsdk@foxitsoftware.cn',
location: 'bj',
reason: 'TestBJ',
flag: 0x1 | 0x2,
image:'data:image/png;base64,iVBORw0...',
isKeepRatio: true,
custom: {
bitmap: new Uint8Array([0x01, 0x02, 0x03]),
opacity: 50,
}
});
Since
11.1.0

◆ addSignerInfo()

SignatureWorkflowService::addSignerInfo (   signerInfo:SignerInfo)
inline

Adds a new signer information to the current signer list.

This signer information will be used in the SDK's built-in signature UI.

Parameters
signerInfoSignerInfo - The signer information to add.
Returns
void - Example:
const service = pdfui.getSignatureWorkflowService();
service.addSignerInfo({
filter: 'Adobe.PPKLite',
subfilter: 'adbe.pkcs7.detached',
signer: 'the signer',
sign: async (signInfo: object, plainBuffer: ArrayBuffer) => {
// Implement logic to sign the document
return plainBuffer;
}
});
Since
11.1.0

◆ getSignatureAPInfoList()

SignatureWorkflowService::getSignatureAPInfoList ( )
inline

Gets the current list of signature appearance information.

Returns
SignatureAppearanceInfo[] - The current list of signature appearance information. Example:
const service = pdfui.getSignatureWorkflowService();
const appearanceStyles = service.getSignatureAPInfoList();
Since
11.1.0

◆ getSignatureAPStyle()

SignatureWorkflowService::getSignatureAPStyle ( )
inline

Gets the default signature appearance style of the SDK's built-in signature UI.

Returns
SignatureStyleConfig - The signature appearance style config. Example:
const service = pdfui.getSignatureWorkflowService();
const defaultAppearance = service.getSignatureAPStyle();
Since
11.1.0

◆ getSignerInfoList()

SignatureWorkflowService::getSignerInfoList ( )
inline

Gets the current list of signer information.

Returns
SignerInfo[] - The current list of signer information. Example:
const service = pdfui.getSignatureWorkflowService();
const signerInfos = service.getSignerInfoList();
Since
11.1.0

◆ overrideSigningWorkflow()

SignatureWorkflowService::overrideSigningWorkflow (   signingWorkflowHandler:SigningWorkflowHandler)
inline

Overrides the default signing workflow for all signature fields.

When a custom signing workflow handler is provided, it will be used to manage the signing process.

If a custom signing workflow handler is set, the viewer will invoke the callback whenever the user clicks on a signature field to sign it. The callback should return the signing settings to be used for the signature.

Example:

const service = pdfui.getSignatureWorkflowService();
service.overrideSigningWorkflow(async (field) => {
// Implement logic to determine the signing settings
return {
filter: 'Adobe.PPKLite',
subfilter: 'adbe.pkcs7.detached',
signer: 'Signer Name',
distinguishName: '',
location: '',
reason: '',
defaultContentsLength: 0,
flag: 0,
sign: async (signInfo: object, plainBuffer: ArrayBuffer) => {
// Implement logic to sign the document
return plainBuffer;
},
image: 'data:image/png;base64,iVBORw0...',
isKeepRatio: false,
timeFormat: {
format:'YYYY-MM-DD HH:mm:ss Z',
timeZoneOptions: { prefix: 'GMT' }
},
custom: {
bitmap: new Uint8Array([0x01, 0x02, 0x03]),
opacity: 50,
},
}
});
Parameters
signingWorkflowHandlerSigningWorkflowHandler - The custom signing workflow handler.
Returns
void -
Since
11.0.0

◆ overrideVerifyWorkflow()

SignatureWorkflowService::overrideVerifyWorkflow (   verifyCallback:VerifyWorkflowHandler)
inline

Overrides the verify workflow for all signature fields.

If a custom verify callback is set, it will be used to verify the signature.

Example:

const service = pdfui.getSignatureWorkflowService();
service.overrideVerifyWorkflow(async (signature) => {
// Implement logic to verify the signature
return 0;
});
Parameters
verifyCallbackVerifyWorkflowHandler - The verify callback to call.
Returns
void -
Since
11.0.0

◆ setSignatureAPStyle()

SignatureWorkflowService::setSignatureAPStyle (   style:SignatureStyleConfig)
inline

Sets the default signature appearance style for the SDK's built-in signature UI.

Parameters
styleSignatureStyleConfig - The appearance style config to set.
Returns
void - Example:
const service = pdfui.getSignatureWorkflowService();
service.setSignatureAPStyle({
flag: 0x1 | 0x2,
custom: {
bitmap: new Uint8Array([0x01, 0x02, 0x03]),
opacity: 50,
}
});
Since
11.1.0

◆ setSignerOverridePolicy()

SignatureWorkflowService::setSignerOverridePolicy (   verridePolicy:SignerOverridePolicy)
inline

Sets the override policy for the signer.

If the policy is set, the viewer will call the policy when the user clicks on a signed signature field to show its properties. The policy can choose to override the signer name with a custom one.

Example:

const service = pdfui.getSignatureWorkflowService();
service.setSignerOverridePolicy(async (field) => {
// Implement logic to determine the signer
return 'the signer';
});
Parameters
verridePolicySignerOverridePolicy - The override policy to set.
Returns
void -
Since
11.0.0

Foxit Software Corporation Logo
@2026 Foxit Software Incorporated. All rights reserved.