interface SignatureType {
    clearSignatureByIndex: (doc: DocType, index: number) => Promise<boolean>;
    clearSignatureByName: (doc: DocType, fieldName: string) => Promise<boolean>;
    getDocSignatureCount: (doc: DocType) => Promise<number>;
    getSignatureInfoByIndex: (
        doc: DocType,
        index: number,
    ) => Promise<SignatureInfoType>;
    getSignatureInfoByName: (
        doc: DocType,
        name: string,
    ) => Promise<SignatureInfoType>;
    signatureSign: (
        signatureInfo: SignatureBaseInfoType,
        signaturePosInfo: SignaturePosInfoType,
        signatureExInfo: SignatureExtendInfoType,
        openSignDoc: boolean,
    ) => Promise<boolean>;
    signatureSignByName: (
        fieldName: string,
        doc: DocType,
        signatureInfo: SignatureBaseInfoType,
        saveSignFilePath: string,
        openSignDoc: boolean,
    ) => Promise<boolean>;
}

Implemented by

Properties

clearSignatureByIndex: (doc: DocType, index: number) => Promise<boolean>

Clear the signature.

Type declaration

    • (doc: DocType, index: number): Promise<boolean>
    • Parameters

      • doc: DocType

        The document.

      • index: number

        The index of the signature.

      Returns Promise<boolean>

      • Whether the operation is successful.
clearSignatureByName: (doc: DocType, fieldName: string) => Promise<boolean>

Clear the signature by name.

Type declaration

    • (doc: DocType, fieldName: string): Promise<boolean>
    • Parameters

      • doc: DocType

        The document.

      • fieldName: string

        The name of the signature field.

      Returns Promise<boolean>

      • Whether the operation is successful.
getDocSignatureCount: (doc: DocType) => Promise<number>

Gets the signature count of the document.

Type declaration

    • (doc: DocType): Promise<number>
    • Parameters

      Returns Promise<number>

      • The signature count.
getSignatureInfoByIndex: (
    doc: DocType,
    index: number,
) => Promise<SignatureInfoType>

Gets the signature base information.

Type declaration

    • (doc: DocType, index: number): Promise<SignatureInfoType>
    • Parameters

      • doc: DocType

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

      • index: number

        The index of the signature.

      Returns Promise<SignatureInfoType>

      • The signature base information.
getSignatureInfoByName: (
    doc: DocType,
    name: string,
) => Promise<SignatureInfoType>

Gets the signature information by name.

Type declaration

signatureSign: (
    signatureInfo: SignatureBaseInfoType,
    signaturePosInfo: SignaturePosInfoType,
    signatureExInfo: SignatureExtendInfoType,
    openSignDoc: boolean,
) => Promise<boolean>

Sign the document.

Type declaration

signatureSignByName: (
    fieldName: string,
    doc: DocType,
    signatureInfo: SignatureBaseInfoType,
    saveSignFilePath: string,
    openSignDoc: boolean,
) => Promise<boolean>

Sign a field.

Type declaration

    • (
          fieldName: string,
          doc: DocType,
          signatureInfo: SignatureBaseInfoType,
          saveSignFilePath: string,
          openSignDoc: boolean,
      ): Promise<boolean>
    • 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.