Add a PNG Signature to a PDF with the PDF.co API
Place an existing signature image and an optional printed name onto a PDF using the PDF Add API.
This adds visible content. It does not create a certificate-based digital signature or verify the signer’s identity. Use only a signature you are authorized to apply.
Step 1: Prepare the PDF and Signature Image
You’ll need:
- A source PDF.
- A PNG image of the signature, preferably with a transparent background.
- A PDF.co API key.
- Postman for sending the request.
Make both files available through URLs that PDF.co can retrieve. For local files, use PDF.co file uploads. You can also use supported file references from your PDF.co file storage.
A storage preview page requiring a browser login is not a direct file download. You do not need to redraw an existing signature or convert it into a long Base64 string.
Step 2: Determine the Signature Position
Open the source PDF in PDF Inspector and identify the area where the signature should appear.
Record its position and available width and height. Coordinates start at the page’s top-left corner.
For this endpoint’s images and annotations arrays:
- pages: "0" targets the first page.
- pages: "1" targets the second page.
The example below places the signature above the printed name on the first page. Its coordinates are illustrative—adjust them for your document.
Step 3: Configure the Request in Postman
Create a POST request to:
https://api.pdf.co/v1/pdf/edit/add
Add these headers:
- x-api-key: Your PDF.co API key.
- Content-Type:
application/json.
Under Body, select raw and JSON, then paste:
{
"url": "REPLACE_WITH_PDF_URL",
"name": "document-with-signature.pdf",
"async": false,
"annotations": [
{
"text": "Alex Example",
"x": 72,
"y": 690,
"size": 12,
"fontName": "Arial",
"pages": "0"
}
],
"images": [
{
"url": "REPLACE_WITH_SIGNATURE_PNG_URL",
"x": 72,
"y": 630,
"width": 150,
"height": 50,
"keepAspectRatio": true,
"pages": "0"
}
]
}Replace:
- REPLACE_WITH_PDF_URL: The accessible source PDF URL.
- REPLACE_WITH_SIGNATURE_PNG_URL: The accessible signature PNG URL.
- Alex Example: The printed name you want to display.
- Position and dimensions: Values measured for your PDF.
Keep keepAspectRatio set to true to preserve the image’s proportions. A transparent PNG avoids covering the document with a solid rectangular background.
If you only need the signature image, remove the annotations array.
Step 4: Save and Inspect the Output
Send the request and check the HTTP status and JSON error field.
On success, download the PDF from the returned url before the temporary link expires. Save the file in your own storage.
Open the downloaded PDF and confirm that:
- The signature appears on the intended page.
- Its proportions and size are appropriate.
- The printed name is correct.
- Neither addition covers required document text.
For longer processing, set async to true, retain the returned jobId, and follow Background Job Check until processing completes before downloading the result.
Related Tutorials

