Skip to main content

E-Signature

The signature object adds a cryptographic digital signature to the generated PDF. Signatures provide non-repudiation and tamper detection — any modification to the signed PDF invalidates the signature.

Properties​

PropertyTypeDefaultDescription
fieldNamestring—Name of the signature form field
positionobject—Fixed position on the page (see below)
appearanceobject—Visual appearance of the signature block
signatureCreatorstring—Application name recorded as the signature creator
signingTypestring"PAdES"Signing standard: PAdES or Detached
certificatestring—Path to the PKCS#12 (.p12/.pfx) certificate file
passwordstring—Password for the certificate file
contactstring—Contact information for the signer
timestampServerstring—URL of an RFC 3161 timestamp authority (optional)
visiblebooleantrueWhether the signature block is visible on the page
claimedSignDatestringcurrent timeDate string in yyyy.MM.dd HH:mm:ss K format
certificationLevelstring"NO_CHANGES_PERMITTED"What modifications are allowed after signing
fieldLockobject—Lock specific form fields after signing
stylestring—Named style reference for the signature appearance

Signing types​

TypeDescription
PAdESPDF Advanced Electronic Signature — embedded in the PDF per ETSI EN 319 142. Recommended for most use cases.
DetachedDetached CMS/CAdES signature — the signature is a separate CMS object. Used when interoperability with non-PDF systems is needed.

Position​

The position object places the visible signature block at a fixed location.

PropertyTypeDefaultDescription
pageNumbernumber11-based page number
leftnumber100Distance from the left edge in points
bottomnumber150Distance from the bottom edge in points
widthnumber160Width of the signature block in points
heightnumber50Height of the signature block in points

Appearance​

The appearance object controls what is displayed in the visible signature block.

PropertyTypeDescription
signedBystringName of the signer displayed in the block
signDatestringDate string displayed in the block
reasonstringReason for signing (e.g., "Approved", "Reviewed")
locationstringLocation of the signer (e.g., "Portland, OR")
imageobjectOptional image (e.g., scanned signature) with src, width, height

Certification levels​

LevelDescription
UNSPECIFIEDDefault — no certification applied
NO_CHANGES_PERMITTEDNo modifications allowed after signing
FORM_FIELDS_MODIFICATIONOnly form field filling is allowed
ANNOTATION_MODIFICATIONForm filling and annotations are allowed

Field lock​

The fieldLock object restricts form field modifications after signing.

PropertyTypeDescription
lockPermissionsstringNO_CHANGES_ALLOWED, FORM_FILLING, or FORM_FILLING_AND_ANNOTATION
fieldLockActionstringALL (lock all fields) or INCLUDE/EXCLUDE with lockedFields
lockedFieldsstring[]Names of specific fields to lock or exclude from locking

Examples​

Basic visible signature​

{
"document": {
"signature": {
"fieldName": "approval_sig",
"certificate": "/certs/signer.p12",
"password": "certPassword",
"signingType": "PAdES",
"signatureCreator": "DocPayload",
"contact": "legal@company.com",
"visible": true,
"position": {
"pageNumber": 1,
"left": 350,
"bottom": 50,
"width": 200,
"height": 60
},
"appearance": {
"signedBy": "Lisa Thompson",
"reason": "Approved",
"location": "Portland, OR"
}
},
"content": [
{ "p": "This document has been reviewed and approved." }
]
}
}

Invisible signature​

{
"document": {
"signature": {
"fieldName": "integrity_sig",
"certificate": "/certs/system.p12",
"password": "systemPass",
"signingType": "PAdES",
"signatureCreator": "DocPayload",
"visible": false,
"certificationLevel": "NO_CHANGES_PERMITTED"
},
"content": [
{ "p": "This document is digitally signed for integrity verification." }
]
}
}

Signature with timestamp server​

{
"document": {
"signature": {
"fieldName": "timestamped_sig",
"certificate": "/certs/signer.p12",
"password": "certPassword",
"signingType": "PAdES",
"signatureCreator": "DocPayload",
"timestampServer": "http://timestamp.digicert.com",
"visible": true,
"position": {
"pageNumber": 1,
"left": 50,
"bottom": 50,
"width": 200,
"height": 60
},
"appearance": {
"signedBy": "Automated System",
"reason": "Generated and signed",
"location": "Cloud"
}
},
"content": [
{ "p": "Signed with a trusted timestamp for long-term validation." }
]
}
}

Signature with field locking​

{
"document": {
"signature": {
"fieldName": "final_approval",
"certificate": "/certs/approver.p12",
"password": "approverPass",
"signingType": "PAdES",
"signatureCreator": "DocPayload",
"certificationLevel": "FORM_FIELDS_MODIFICATION",
"fieldLock": {
"lockPermissions": "FORM_FILLING",
"fieldLockAction": "ALL",
"lockedFields": []
},
"visible": true,
"position": {
"pageNumber": 1,
"left": 350,
"bottom": 50,
"width": 200,
"height": 60
},
"appearance": {
"signedBy": "Final Approver",
"reason": "Final approval — all fields locked",
"location": "Head Office"
}
},
"content": [
{ "p": "After signing, no form fields can be modified." }
]
}
}