Implements

Constructors

  • No longer use 'new' to create, but use create instead.

    Parameters

    • Optionaloptions: Options

      Configuration options containing necessary initialization information.

    Returns Signature

     const signature = await Signature.create();
    

Methods

  • Clear the signature.

    Parameters

    • doc: DocType

      The document.

    • index: number

      The index of the signature.

    Returns Promise<boolean>

    • Whether the operation is successful.
  • Clear the signature by name.

    Parameters

    • doc: DocType

      The document.

    • fieldName: string

      The name of the signature field.

    Returns Promise<boolean>

    • Whether the operation is successful.
  • Gets the signature count of the document.

    Parameters

    • doc: DocType

      The document, In general, it is the current document.

    Returns Promise<number>

    • The signature count.
  • Sign a field.

    Parameters

    • fieldName: string

      The name of the field.

    • doc: DocType

      The document.

    • signatureInfo: SignatureBaseInfoType

      The signature information.

    • saveSignFilePath: string

      The path to save the signed file.

    • openSignDoc: boolean

      Whether to open the signed document.

    Returns Promise<boolean>

    • Whether the operation is successful.
  • Creates a new instance of the Signature class.

    Parameters

    • Optionaloptions: Options

      Configuration options containing necessary initialization information.

    Returns Promise<SignatureType>

    • A promise that resolves with a new instance of the Signature class.