Here’s a simple example showing how to add a text signature to a document using Python:
importgroupdocs.signatureassignaturefromgroupdocs.signature.optionsimportTextSignOptionsimportgroupdocs.signature.domainasgsdimportsysimportosdefrun():withsignature.Signature("./sample.pdf")assign:# Create text signature optionstext_options=TextSignOptions("John Smith")# Set text signature positiontext_options.left=100text_options.top=100# Set text signature fonttext_options.font=gsd.SignatureFont()text_options.font.size=20text_options.font.family_name="Arial"text_options.font.bold=Truetext_options.font.color=gsd.Color.BLUE# Sign documentsign.sign("./SampleSigned.pdf",text_options)
Supported Signature Types
The following articles contain detailed examples of how to eSign documents with each supported signature type:
Text Signatures - Add text-based signatures with customizable fonts and styles
Image Signatures - Insert image-based signatures from files or streams
Each signature type supports various customization options and can be used in combination with other signature types to create complex document signing solutions.
More Resources
GitHub Examples
You may easily run the code above and see the feature in action in our GitHub examples: