- Getting Started
- The Main Class
- Create a Signature Field
- Signature Appearance Modules
- Signature Modules
- Timestamp Modules
- Asynchronous Signature Workflow
- Sign Several Times
- Signing PDF Forms
- Long-Term Validation (LTV)
- Trust Settings
- LTV (pre-release)
- API Reference
Create a Signature Field
Table of Contents
A signature in a PDF document requires a signature field. This field may be hidden or displayed through a widget annotation on a specific page.
The SetaPDF-Signer component offers a class that allows you to access or create signature fields: The
Simple hidden signature fields can be created by just some lines of code. The document instance could be created by an existing document as well!
To automatically get or create a signature field instance the class also offers a
get() method, that will create a hidden signature field automatically if no signature field was found:
$field = SetaPDF_Signer_SignatureField::get($document, 'Signature');
SetaPDF_Signer_SignatureField class allows you to create visible signature fields by absolute or relative positions.
The default signature field name
If a name that is passed to the
add() method already exists it will be suffixed with a numeric incrementing value.
You can check the final name with the
So a common logic to have a unique signature field would be:
$field = $signer->addSignatureField(); $signer->setSignatureFieldName($field->getQualifiedName());