Sign PDF

Sign PDF API

File Tools

Sign a PDF in your browser: draw, type or upload your signature, add initials, text and dates, drag them into place, and download. Nothing is uploaded.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

20 requests per minute

Endpoints

1 endpoint available

Overview

Stamp a signature image onto a PDF at one or more places. Upload the PDF, the signature (a PNG with a transparent background works best) and a JSON list of placements.

Coordinates

Positions and sizes are in PDF points (72 points = 1 inch). The origin is the top-left corner of the page as it is displayed (its visible crop box, after any page rotation), with x to the right and y down. A US Letter page is 612 x 792 points; A4 is about 595 x 842. The image is drawn upright as the page is viewed, even on rotated pages.

Give width; height is optional and defaults to the image's own aspect ratio. A placement that runs off the page returns 422 with the page's size.

Limits

  • PDF up to 25 MB; signature image (PNG, JPEG or WebP) up to 5 MB, scaled down to 2000 px on its long edge.
  • At most 100 placements.
  • This adds an image, not a cryptographic digital signature.

Endpoints

POST
https://opentools.ca/api/v1/tools/sign-pdf
Place a signature image on PDF pages

Request Body

Content-Type: multipart/form-data

ParameterTypeRequiredDescription
file
file
Required
The PDF to sign.
signature
file
Required
The signature image: PNG (transparency kept), JPEG or WebP, up to 5 MB.
placements
string (JSON array)
Required
Where to draw it, 1 to 100 entries: [{"page": 1, "x": 72, "y": 650, "width": 180, "height": 45}]. page starts at 1; x, y, width and height are in points from the top-left of the displayed page; height is optional.

Response Example

The signed PDF file (Content-Type: application/pdf, filename <name>-signed.pdf).

Error Codes

400
Bad Request - missing or invalid fields (see details)
401
Unauthorized - missing or invalid API key
403
Forbidden - API key inactive or expired, or request IP not allowed
413
Payload Too Large - a file is over 25 MB
415
Unsupported Media Type - the file is not a PDF, or the signature is not a PNG, JPEG or WebP image
422
Unprocessable - the PDF is damaged or password-protected, the signature could not be read, or a placement is off the page
429
Too Many Requests - more than 20 requests per minute for this key
500
Internal Server Error

Code Examples

curl -X POST https://opentools.ca/api/v1/tools/sign-pdf \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "file=@contract.pdf" \
  -F "signature=@signature.png" \
  -F 'placements=[{"page": 3, "x": 72, "y": 650, "width": 180}]' \
  -o contract-signed.pdf

Ready to get started?

Create an API key to start using the Sign PDF API.

Rather use it in your browser? Open the Sign PDF