| FoxitPDFSDKforWeb v11.1.0 Archives Foxit PDF SDK for Web

Public Member Functions | List of all members
SignatureService Class Reference
PDF » form

This class provides methods for customizing signature signing/verification behavior. More...

## Public Member Functions
| setVerifyHandler (handler:VerifySignatureHandler)
| Sets the verify signature handler which will be called when the viewer needs to verify a signature. More...

## Detailed Description

This class provides methods for customizing signature signing/verification behavior.

Since
  11.0.0

## Member Function Documentation

## ◆ setVerifyHandler()

SignatureService::setVerifyHandler | ( |  | handler:VerifySignatureHandler | ) |
| inline

Sets the verify signature handler which will be called when the viewer needs to verify a signature.

The handler should return a verification result code.:

Example:

const service = pdfViewer.getSignatureService();
service.setVerifyHandler(async (signatureField, plainContent, signedData, hasDataOutOfScope) => {
const filter = await signatureField.getFilter();
const subfilter = await signatureField.getSubfilter();
const signer = await signatureField.getSigner();
const formdata = new FormData();
formdata.append("filter", filter);
formdata.append("subfilter", subfilter);
formdata.append("signer", signer);
formdata.append("plainContent", new Blob([plainContent]), "plainContent");
formdata.append("signedData", new Blob([signedData]), "signedData");
const response = await fetch('https://<server>:<port>/<path/to/>verify', {
method: 'POST',
body: formdata
});
return parseInt(await response.text());
});

Parameters

  handler | VerifySignatureHandler - The handler that will be called when the viewer needs to verify a signature.

Returns
  void -

Since
  11.0.0

@2026 Foxit Software Incorporated. All rights reserved.