FormFieldSignOptions class

FormFieldSignOptions class

Represents the FormField signature options for PDF documents.

Provides options for creating or updating form field signatures in PDF files.

The FormFieldSignOptions type exposes the following members:

Constructors

Constructor Description
init Initializes a new instance of the PdfFormFieldSignOptions class with default values.
init Initializes a new instance of the PdfFormFieldSignOptions class with FormField signature.

Properties

Property Description
height The height of the signature area on the document page in measure units (pixels, percents, or millimeters; see MeasureType SizeMeasureType).
horizontal_alignment The horizontal alignment of the image on a document page.
left The left X position of the signature area on the document page in measure units (pixels, percents, or millimeters).
location_measure_type The measure type (pixels, percents or millimeters) for Left and Top properties.
margin The default space between the image and document edges (applies when horizontal or vertical alignment is set).
margin_measure_type The margin measurement type (pixels, percents, or millimeters).
rotation_angle The rotation angle, measured clockwise.
signature The FormField of the signature.
size_measure_type The measure type (pixels, percents or millimeters) for Width and Height properties.
stretch The stretch mode on document page.
top The top Y position of the signature area on the document page in measure units (pixels, percents, or millimeters). See MeasureType for the location measure type.
transparency The transparency of the form field signature. The value ranges from 0.0 to 1.0, with a default of 0.
vertical_alignment The vertical alignment of the image on a document page.
width The width of the signature area on the document page in measure values (pixels, percents, or millimeters; see MeasureType SizeMeasureType).
all_pages The signature will be placed on all document pages. (inherited from SignOptions)
appearance The additional signature appearance. (inherited from SignOptions)
background The signature background settings. (inherited from TextSignOptions)
border The border settings. (inherited from TextSignOptions)
document_type The document type of the signature options (DocumentType). (inherited from SignOptions)
extensions The signature extensions. (inherited from SignOptions)
font The font of the signature. (inherited from TextSignOptions)
fore_color The fore color of the signature. (inherited from TextSignOptions)
form_text_field_title The title of the text form field to place the text signature into. Can be used only when signature_implementation is set to TextSignatureImplementation.FORM_FIELD. (inherited from TextSignOptions)
form_text_field_type The type of form field to place the text signature into. This property is applicable only when signature_implementation is set to TextSignatureImplementation.FORM_FIELD (i.e., TextToFormField). The default value is FormTextFieldType.ALL_TEXT_TYPES. (inherited from TextSignOptions)
hash_algorithm The hash algorithm to be used for cryptographic operations. Supported exclusively for digital signatures in PDF files. (inherited from SignOptions)
native The native attribute. (inherited from TextSignOptions)
page_number The document page number for signing. (inherited from SignOptions)
pages_setup The options to specify pages to be signed. (inherited from SignOptions)
shape_position The shape position defines where the shape should be presented in the document layout. Available only for Word documents. (inherited from TextSignOptions)
shape_type The type of shape to put text. (inherited from TextSignOptions)
signature_id The unique ID of the signature, usable in verification options and supported only for PDF documents. (inherited from TextSignOptions)
signature_implementation The type of text signature implementation. (inherited from TextSignOptions)
signature_type The signature type (SignatureType). (inherited from SignOptions)
text The text of the signature. (inherited from TextSignOptions)
text_horizontal_alignment The horizontal alignment of text inside a signature, supported only for Image and Annotation signature implementations (see TextSignatureImplementation SignatureImplementation property). (inherited from TextSignOptions)
text_vertical_alignment The vertical alignment of text inside a signature. (inherited from TextSignOptions)
zorder The Z-order position of the text signature, which determines the display order of overlapping signatures. (inherited from SignOptions)

Example

from groupdocs.signature import Signature
from groupdocs.signature.options import FormFieldSignOptions
from groupdocs.signature.domain import TextFormFieldSignature

def sign_with_form_field_signature():
    with Signature("sample.pdf") as signature:
        text_field = TextFormFieldSignature("FieldText", "Value1")
        options = FormFieldSignOptions(text_field)
        options.left = 100
        options.top = 400
        options.width = 200
        options.height = 20

        result = signature.sign("signed_form_field.pdf", options)
        for field in result.succeeded:
            print(f"Added form field '{field.name}' with value '{field.value}'")

See Also