PDF Signing
Full reference for PAdES PDF signing — visible and invisible signatures, multi-page, timestamps, and appearance customization.
All features supported
Overview
SecureSign embeds PAdES-compliant digital signatures into PDF documents using the DSC token private key. Supports visible stamps with full appearance customization and invisible signatures for backend-only signing.
- Input: base64-encoded PDF or PDF URL (mobile deep link).
- Output: signed PDF with embedded signature field and optional visible appearance.
- Coordinates use PDF points (1/72 inch); origin is bottom-left of the page.
Platform Support
| Feature | Mobile App | Desktop Software | REST API |
|---|---|---|---|
| PDF Sign | Deep link | Deep link | POST /sign/pdf |
| Visible PDF Signature | Supported | visible: true | visible: true |
| Invisible PDF Signature | Supported | visible: false | visible: false |
| Multi-Page PDF | page field | page field | page field |
| Multiple Signatures | Sequential signs | signatureIndex | Multiple requests |
| PDF Verification | Supported | POST /verify/pdf | POST /verify/pdf |
| PDF Timestamping | TSA option | timestamp: true | timestamp: true |
| Position Selection | position object | position object | position object |
| Custom Appearance | appearance object | appearance object | appearance object |
Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
pdfBase64 | string | Yes* | Base64-encoded PDF (*or pdfUrl on mobile) |
visible | boolean | No | Show visible stamp (default false) |
page | number | When visible | 1-based page number for stamp placement |
position | object | When visible | { x, y, width?, height? } in PDF points |
appearance | object | No | Visible stamp customization — see Signature Customization |
reason | string | No | Signing reason metadata (also in appearance) |
location | string | No | Signing location metadata |
certSerial | string | No | Pre-select certificate |
timestamp | boolean | No | Embed TSA timestamp (default false) |
signatureIndex | number | No | Field name suffix for multiple signatures (Signature2, etc.) |
callbackUrl | string | REST only | Server callback URL |
Visible vs Invisible
| Mode | visible | Appearance | Use case |
|---|---|---|---|
| Visible | true | appearance + position required | Forms, contracts, government filings |
| Invisible | false | Ignored | Backend document sealing, audit trails |
Multi-Page & Multiple Signatures
Multi-page — set page to the target page number. Each sign operation adds one signature field.
Multiple signatures — sign the output PDF again with incremented signatureIndex. Each pass adds a new signature field without invalidating prior signatures.
{
"pdfBase64": "JVBERi0x...",
"visible": true,
"page": 3,
"signatureIndex": 2,
"position": { "x": 72, "y": 120, "width": 220, "height": 80 },
"appearance": { "templateId": "minimal", "signerName": "Rajesh Kumar" }
}
Examples
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 and appearance params to URLSearchParams
Response
{
"success": true,
"signedPdfBase64": "JVBERi0x...",
"signatureField": "Signature1",
"appearanceApplied": {
"templateId": "gov_portal",
"visible": true,
"page": 1,
"signerName": "Rajesh Kumar",
"signedAt": "2026-06-22T10:30:00+05:30"
}
}
Errors
| Code | Cause | Resolution |
|---|---|---|
SS_PDF_INVALID | Corrupt or non-PDF input | Verify base64 encoding and PDF structure |
SS_PAGE_OUT_OF_RANGE | page exceeds document pages | Check page count |
POSITION_OUT_OF_BOUNDS | Stamp extends past page edge | Adjust position coordinates |
APPEARANCE_REQUIRES_VISIBLE | appearance with visible: false | Set visible: true |
SS_PDF_ALREADY_SIGNED | Signature field name collision | Increment signatureIndex |
See also Signature Customization and Signing API — POST /sign/pdf.