Signature Customization

Full API reference for visible PDF signature appearance — all customization options are supported and production-ready on Mobile App and Desktop Software.

All options supported

Every appearance option listed below is implemented and working in SecureSign Mobile App and Desktop Software. Set visible: true on PDF signing requests and pass the appearance object (or equivalent top-level fields accepted for backward compatibility).

Overview

Signature customization controls the visible stamp drawn on a PDF page before the cryptographic PAdES signature is embedded. It does not change the signing algorithm (still SHA-256 + RSA/EC from the DSC token).

  • Applies to visible PDF signing only (visible: true).
  • Invisible PDF signatures ignore appearance fields.
  • XML and hash signing do not use appearance options.
  • Coordinates use PDF points (1/72 inch); origin is bottom-left of the page.

Platform Support

Option groupMobile AppDesktop SoftwareREST API POST /sign/pdf
Text fields (name, designation, labels)SupportedSupportedSupported
Date & time displaySupportedSupportedSupported
Certificate serial displaySupportedSupportedSupported
Custom text lineSupportedSupportedSupported
Signature imageSupportedSupportedSupported
Company logoSupportedSupportedSupported
QR codeSupportedSupportedSupported
Custom stamp imageSupportedSupportedSupported
Appearance templatesSupportedSupportedSupported

Request Shape

Pass customization inside an appearance object on PDF sign requests. Top-level aliases (e.g. signerName at root) are also accepted for backward compatibility.

POST https://api.securesign.toolsbots.com/v1/sign/pdf
{
  "pdfBase64": "JVBERi0x...",
  "visible": true,
  "page": 1,
  "position": {
    "x": 72,
    "y": 120,
    "width": 240,
    "height": 90
  },
  "appearance": {
    "templateId": "gov_portal",
    "signerName": "Rajesh Kumar",
    "designation": "Director",
    "reason": "Approved for MCA filing",
    "location": "Mumbai, India",
    "showDateTime": true,
    "showSerial": true,
    "customText": "Digitally signed via SecureSign",
    "imageBase64": "iVBORw0KGgo...",
    "logoBase64": "iVBORw0KGgo...",
    "stampImageBase64": "iVBORw0KGgo...",
    "qrContent": "https://verify.example.gov.in/doc/abc123"
  }
}

Position object

FieldTypeRequiredDescription
xnumberYesLeft edge in PDF points from page bottom-left
ynumberYesBottom edge in PDF points
widthnumberNoStamp width in points (default 200)
heightnumberNoStamp height in points (default 72; increase when using logo + QR)

Appearance Fields

All fields below are optional unless noted. Omitted fields use product defaults or certificate-derived values (e.g. signer name from DSC subject CN).

Text & labels

FieldTypeDefaultDescription
signerNamestringCertificate CNName shown on the visible stamp
designationstringJob title or role (e.g. Director, Authorized Signatory)
customTextstringFree-form line below designation (portal reference, file number, etc.)
reasonstringDocument digitally signedSigning reason shown on stamp
locationstringIndiaSigning location shown on stamp
signedByLabelstringDigitally signed byHeader label above signer name
dateLabelstringDateLabel prefix for timestamp line
reasonLabelstringReasonLabel prefix for reason line
locationLabelstringLocationLabel prefix for location line

Date, time & certificate

FieldTypeDefaultDescription
showDateTimebooleantrueWhen true, signing timestamp is rendered on the stamp
dateFormatstringdd MMM yyyy HH:mm:ss zJava-style date format for the displayed timestamp
showSerialbooleanfalseWhen true, DSC certificate serial number is shown

Images, QR & stamp

FieldTypeDefaultDescription
imageBase64stringCustom signature bitmap (PNG or JPEG, base64). Drawn inside the stamp area
logoBase64stringOrganization logo (PNG or JPEG, base64). Typically top-left or top-right per template
stampImageBase64stringRound or square rubber-stamp image (PNG with transparency recommended)
qrContentstringURL or text encoded in verification QR code on the stamp
qrSizenumber48QR code edge length in PDF points

Legacy alias: stampImage is accepted as an alias for stampImageBase64.

Layout & colors

FieldTypeDefaultDescription
templateIdstringstandardPre-built layout template (see Templates)
borderColorstring#3366AAStamp border color (hex)
backgroundColorstring#F2F6FFStamp fill color (hex)
accentColorstring#1A3366Title bar / accent strip color (hex)

Templates

Set appearance.templateId to select a layout. All templates support the same fields; templates control element placement and default sizing.

templateIdLayoutBest for
standardText block: signed-by label, name, date, reason, locationGeneral business documents
minimalSigner name + date/time onlyCompact stamps on forms
gov_portalLogo + text block + QR verification codeMCA, GST, GeM, government portals
brandedLogo + signature image + name + designationCorporate letterheads
stamp_roundCustom stamp image overlay + optional serial/dateTraditional round/square rubber stamps
image_onlySignature image fills the position rectangleHand-drawn signature bitmap only

Recommended sizes

For gov_portal and branded templates, set position.height to at least 90 points when using logo + QR together.

Images & Stamps

  • Formats: PNG (recommended for logos/stamps with transparency) or JPEG.
  • Encoding: Raw base64 string — no data:image/png;base64, prefix.
  • Max size: 512 KB per image after base64 decode.
  • Resolution: 150–300 DPI source images produce sharp stamps at typical PDF zoom levels.
  • QR content: HTTPS verification URLs are recommended; max 2,048 characters.

Examples

Standard text appearance (Desktop Software)

const params = new URLSearchParams({
  requestId: crypto.randomUUID(),
  hashBase64: sha256Base64,
  hashAlgo: 'SHA256',
  documentType: 'pdf',
  callbackUrl: 'https://portal.example.gov.in/sign/callback',
  apiKey: 'ss_live_abc123xyz'
});
window.location.href = `securesign://sign?${params}`;
// Add documentBase64, visible, position, appearance to URLSearchParams

Government portal — logo + QR + serial

{
  "pdfBase64": "JVBERi0x...",
  "visible": true,
  "page": 1,
  "position": { "x": 72, "y": 100, "width": 280, "height": 100 },
  "appearance": {
    "templateId": "gov_portal",
    "signerName": "Rajesh Kumar",
    "designation": "Authorized Signatory",
    "showDateTime": true,
    "showSerial": true,
    "logoBase64": "iVBORw0KGgoAAAANSUhEUg...",
    "qrContent": "https://verify.example.gov.in/doc/abc123",
    "qrSize": 56,
    "customText": "MCA Form filing — Ref: ABC/2026/001"
  }
}

Branded — signature image + company logo

{
  "visible": true,
  "page": 1,
  "position": { "x": 350, "y": 80, "width": 260, "height": 110 },
  "appearance": {
    "templateId": "branded",
    "signerName": "Rajesh Kumar",
    "designation": "Managing Director",
    "imageBase64": "iVBORw0KGgo...",
    "logoBase64": "iVBORw0KGgo...",
    "showDateTime": true,
    "borderColor": "#1E40AF",
    "backgroundColor": "#EFF6FF"
  }
}

Round stamp overlay

{
  "visible": true,
  "page": 1,
  "position": { "x": 400, "y": 200, "width": 120, "height": 120 },
  "appearance": {
    "templateId": "stamp_round",
    "stampImageBase64": "iVBORw0KGgo...",
    "showDateTime": true,
    "showSerial": true,
    "signerName": "Rajesh Kumar"
  }
}

Mobile App — deep link with appearance

Pass appearance fields as URL query parameters (JSON-encoded appearance blob) or individual params:

const appearance = {
  templateId: 'gov_portal',
  signerName: 'Rajesh Kumar',
  designation: 'Director',
  showDateTime: true,
  qrContent: 'https://verify.example.gov.in/abc123'
};
const params = new URLSearchParams({
  requestId,
  pdfUrl: encodeURIComponent(pdfDownloadUrl),
  callbackUrl,
  apiKey,
  visible: 'true',
  page: '1',
  appearance: btoa(JSON.stringify(appearance))
});
window.location.href = `securesign://sign/pdf?`;

Response

Successful PDF signing returns the signed document and metadata about the applied appearance:

{
  "success": true,
  "signedPdfBase64": "JVBERi0x...",
  "signatureField": "Signature1",
  "appearanceApplied": {
    "templateId": "gov_portal",
    "visible": true,
    "page": 1,
    "position": { "x": 72, "y": 100, "width": 280, "height": 100 },
    "signerName": "Rajesh Kumar",
    "signedAt": "2026-06-22T10:30:00+05:30"
  }
}

Errors

CodeCauseResolution
APPEARANCE_REQUIRES_VISIBLEappearance sent with visible: falseSet visible: true or remove appearance fields
INVALID_IMAGE_FORMATimageBase64, logoBase64, or stampImageBase64 is not valid PNG/JPEGRe-encode image; remove data-URI prefix
IMAGE_TOO_LARGEDecoded image exceeds 512 KBCompress or resize source image
INVALID_TEMPLATEUnknown templateIdUse a supported template from the table above
POSITION_OUT_OF_BOUNDSStamp rectangle extends past page edgeAdjust position.x, y, width, or height
QR_CONTENT_TOO_LONGqrContent exceeds 2,048 charactersShorten URL or use a redirect link

See also PDF Signing for multi-page and invisible signature options, and Signing API — POST /sign/pdf for orchestration flow.