__init__ constructor

init

Initializes a new instance of the PdfFormFieldSignOptions class with default values.

def __init__(self):
    ...

Example

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

text_field = TextFormFieldSignature("FieldText", "Value1")
options = FormFieldSignOptions(text_field)

init

Initializes a new instance of the PdfFormFieldSignOptions class with FormField signature.

def __init__(self, signature):
    ...
Parameter Type Description
signature FormFieldSignature Form Field signature object.

Example

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

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