sign_pdf
Add a signature image to a PDF with options for page range, alignment, size, margins, and opacity. Places a JPG/PNG signature onto chosen pages and saves the signed PDF.
Instructions
Add a signature image to a PDF using the PDF4me SignPdf API. Provide paths to the PDF and signature image (e.g. JPG/PNG). Supports page ranges, alignment, size, margins, opacity, and async 202 polling. Optional output directory and file name; saves the signed PDF to disk.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pages | No | Page spec (e.g. "1", "1,3,5", "2-5", "1-3"). | 1-3 |
| align_x | No | Horizontal alignment (e.g. Left, Center, Right — API may accept any casing). | right |
| align_y | No | Vertical alignment (e.g. Top, Middle, Bottom). | bottom |
| opacity | No | Opacity 0–100 as a string. | 100 |
| file_path | Yes | Local path to the PDF to sign. | |
| output_dir | No | ||
| margin_x_mm | No | 20 | |
| margin_x_px | No | 57 | |
| margin_y_mm | No | 20 | |
| margin_y_px | No | 57 | |
| width_in_mm | No | 50 | |
| width_in_px | No | 142 | |
| height_in_mm | No | 25 | |
| height_in_px | No | 71 | |
| is_background | No | Maps to isBackground. | |
| output_file_name | No | ||
| show_only_in_print | No | Maps to showOnlyInPrint. | |
| signature_file_path | Yes | Local path to the signature image file. |