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...
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
◆ 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
-
- 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,
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
-
| signerInfo | SignerInfo - 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) => {
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) => {
return {
filter: 'Adobe.PPKLite',
subfilter: 'adbe.pkcs7.detached',
signer: 'Signer Name',
distinguishName: '',
location: '',
reason: '',
defaultContentsLength: 0,
flag: 0,
sign: async (signInfo: object, plainBuffer: ArrayBuffer) => {
return plainBuffer;
},
image: 'data:image/png;base64,iVBORw0...',
isKeepRatio: false,
timeFormat: {
format:
'YYYY-MM-DD HH:mm:ss Z',
timeZoneOptions: { prefix: 'GMT' }
},
bitmap: new Uint8Array([0x01, 0x02, 0x03]),
opacity: 50,
},
}
});
- Parameters
-
| signingWorkflowHandler | SigningWorkflowHandler - 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) => {
return 0;
});
- Parameters
-
| verifyCallback | VerifyWorkflowHandler - 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
-
- Returns
- void - Example:
const service = pdfui.getSignatureWorkflowService();
service.setSignatureAPStyle({
flag: 0x1 | 0x2,
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) => {
return 'the signer';
});
- Parameters
-
| verridePolicy | SignerOverridePolicy - The override policy to set. |
- Returns
- void -
- Since
- 11.0.0