Sign PDF
Edit → Sign PDF
The Sign PDF API places a signature image on your PDF. You send the PDF (docContent, docName), the signature image (imageFile Base64, imageName), alignX and alignY, optional pages, size (mm or px), margins, opacity, showOnlyInPrint, isBackground, and async. The API returns the PDF with the signature applied. Use the tester below to try it; more details are in the sections that follow.
Try the Sign PDF API
:::note Quick reference
Endpoint: POST /api/v2/SignPdf · Required: api-key, docContent, docName, imageFile, imageName, alignX, alignY
:::
:::info Try it live Use the form below to send your API key, PDF (Base64), and signature image (Base64). The response is the PDF with the signature. No code required—fill the fields and click Send request. :::
Overview, parameters, and use cases
- Overview
- Parameters
- Use cases
What is Sign PDF?
This endpoint places a signature image on specified pages of a PDF. You provide the PDF (Base64), the signature image (Base64), position (alignX, alignY), optional pages, size (widthInMM/heightInMM or widthInPx/heightInPx), margins in mm or px, opacity (0–100), showOnlyInPrint, and isBackground. The API returns the PDF with the signature applied. Perfect for adding visual signatures to contracts, forms, or letters.
Key features
- Signature image – imageFile (Base64), imageName (e.g. signature.jpg).
- Position and size – alignX (Left, Center, Right), alignY (Top, Middle, Bottom); size in mm (10–200) or px (20–600); margins in mm or px.
- Opacity – 0 = invisible, 100 = fully opaque (typically 100 for signatures).
- Page targeting – pages: e.g. 1, 1,3,5, 2-5, 1,3,7-10, 2-.
- showOnlyInPrint – Show signature only when printing; isBackground places it behind or in front of content.
:::tip Best for Use for visual signatures on contracts, forms, or approval documents. For image watermarks or stamps use Add Image Stamp to PDF; for text watermarks use Add Text Stamp to PDF. :::
API parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| api-key | string | Yes | Your PDF4me API key, Base64 encoded. Get it from the dashboard. |
| docContent | base64 | Yes | PDF file content (Base64). |
| docName | string | Yes | Output PDF file name (e.g. output.pdf). |
| imageFile | base64 | Yes | Signature image content (Base64). |
| imageName | string | Yes | Signature image name with extension (e.g. signature.jpg). |
| alignX, alignY | string | Yes | Left/Center/Right; Top/Middle/Bottom. |
| pages | string | No | e.g. 1, 1,3,5, 2-5, 1,3,7-10, 2-. |
| widthInMM, heightInMM | string | No | Size in mm (10–200). |
| widthInPx, heightInPx | string | No | Size in pixels (20–600). |
| marginXInMM, marginYInMM, marginXInPx, marginYInPx | string | No | Margins in mm or px. |
| opacity | string | No | 0–100. |
| showOnlyInPrint | boolean | No | Show only when printing. |
| isBackground | boolean | No | Place signature in background. |
| async | boolean | No | Enable asynchronous processing. |
When to use Sign PDF
- Contracts and agreements – Add a visual signature image to signed documents.
- Forms and approvals – Place a signature on approval or consent forms.
- Letters and reports – Add an author or signatory signature to letters or reports.
- Workflows – Automate placing a stored signature image on generated PDFs.
:::info Need the full API? For request/response schemas and code samples, see Sign PDF in the PDF4me API docs. :::
Prerequisites
Before using this endpoint, make sure you have:
- A valid PDF4me API key (Get your API Key)
- A PDF document in Base64 format or a public URL to a PDF file
- A signature image file (JPG, PNG, etc.)
Response Format
The API returns a PDF document with the signature image applied to the specified pages.