signField

public final void signField(String inputPath, String outputPath, String fieldName, DigitalSignatureOptions options, SignatureAppearance appearance)

Applies a signature to a PDF document using an existing signature field. Supports both digital signatures (with certificate) and electronic signatures (visual only). The behavior depends on what is provided:Certificate + Appearance: Digital signature with custom visual appearance.Certificate only: Digital signature with auto-generated appearance from metadata.Appearance only: Electronic signature (visual only, field is replaced with image/text).Neither: Throws ArgumentException.

Parameters

inputPath

The path to the input PDF file.

outputPath

The path where the signed PDF will be saved.

fieldName

The name of the existing signature form field to use for the signature.

options

The digital signature options. Can be null for electronic signatures.

appearance

The visual appearance of the signature.

Throws

Thrown when , , or is null.

ArgumentException

Thrown when neither certificate nor appearance is provided.

SdkException

Thrown when the signing operation fails or the field is not found.