PDF.co offers an easy way to add or stamp signatures to your document. You can do this using the PDF Editor Web API. Check out our beginner-friendly Python demo below.

Add Signature to PDF

  1. Add Source File
  2. Install Requests Module
  3. Input API Key
  4. Source File, Output, and Image Param
  5. Run the Program
  6. PDF Editor Web API Demo

In this demonstration, we will add a signature to the PDF using the /v1/pdf/edit/add endpoint. We will use the JPEG of John Doe’s signature. If you don’t have an image or a drawn signature, you can use our Make a Signature tool here.

Sample PDF And PDF With Added Signature
Sample PDF And PDF With Added Signature

Step 1: Add Source File

First, add your sample source file to the python program. You can also use the given sample file and download the python code here.

Step 2: Install Requests Module

Next, kindly install the request module. Then, run the python -m pip install requests in your command line to access the requests module.

Step 3: Input API Key

Now, open the Python sample code and add the PDF.co API Key. You can get your API Key in your dashboard here.

Add API Key

Step 4: Source File, Output, and Image Param

  • In line 13, enter your source file URL. You can also use the given sample file.
  • In line 25, type in the desired output PDF file name.
  • In line 31, enter the image URL. You can upload your file here to get the URL for use in PDF.co.

Source File, Output And Image Param

Step 5: Run the Program

Now, let’s run the python program and see the output in your folder.
Result

Step 6: PDF Editor Web API Demo

Here is the PDF Editor Web API in action.

Add Texts, Signatures and Images Web API Demo
PDF Editor Web API In Action

In this tutorial, you learned how to add a signature to PDF in Python. You learned how to use the PDF.co PDF Editor Web API to add the signature in PDF. You also learned how to install the requests module.

Related Pages:

Related Samples: