__init__ constructor

init

Initializes a PdfTextFormFieldSignature with a predefined name.

def __init__(self, name):
    ...
Parameter Type Description
name str Name of form field 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}'")

init

Initializes a PdfTextFormFieldSignature with a predefined name.

def __init__(self, name, text):
    ...
Parameter Type Description
name str Name of form field object.
text str Text of form field object.

Example

from groupdocs.signature.domain import TextFormFieldSignature

# Create a text form field named "FieldText" with the value "Value1"
text_field = TextFormFieldSignature("FieldText", "Value1")

See Also