PDF Editor API Benefits

Fast and easy to use

Using PDF.co you can easily add texts, images, and signatures to your PDF. You can fill out existing PDF forms and documents and create new fillable PDF forms using this method.

API and Business Automation Platforms Integrations

Programmers can run API engines at PDF.co platform using the following programming languages: C#, PHP, Javascript, .NET and ASP.NET, Java, Visual Basic, and many others.

You can easily automate your PDF activities even if you’re a non-developer using business automation platforms like ZapierIntegromatUiPathBluePrismAutomation Anywhere, and others.

On-Premise for Enterprise

PDF.co platform works on secure and certified cloud infrastructure. Enterprise customers can process sensitive data in-house using our on-premise version. It works on your server and can even run completely offline when required.

Sign Up


PDF Editor API Sample & Demo

For this demo, I am going to use a Sample PDF File.

Screenshot of Source File
Screenshot of Source File

The code snippets used below can be written in different programming languages. The API engine adds text to our sample PDF file. The final result will look like this.

Screenshot of Output PDF
Screenshot of Output PDF

Before we proceed with the code. Let us first check the /v1/pdf/edit/add parameters and its uses.


URL: https://api.pdf.co/v1/pdf/edit/add
Method: POST
Parameter Description
url required. Link to the source file.
annotations[] optional. An array of text objects to be added on top of pdf. Text objects can be ready-only ("type": "text" by default), input pdf input fields ("type": "textField") or checkboxes ("type": "checkbox"). See font list for all PDF.co supported fonts.
images[] optional. An array of image URLs (also can be a link to Files storage or Datauri link) to be added on top of the PDF file. Images can be loaded from URLs or URLs for internal file storage.
fields[] optional. An array of values to update fillable pdf fields in input pdf. You can create your own automated PDF filler for your pdf forms using this array.
password optional. The password of the PDF file. Must be a String.
async optional. Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check the state of the processing (possible states: workingfailedaborted and success). Must be one of: truefalse.
encrypt optional. Enable encryption for the output file: true or false
name optional. Output file name.
profiles optional. Must be a String. Set custom configuration. See profiles examples here

Now we are ready to write some codes.

cURL Code Snippet

curl --location --request POST 'https://api.pdf.co/v1/pdf/edit/add' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data-raw '{
"async": false,
"encrypt": true,
"name": "newDocument",
"url": "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf",
"annotations": [
"text": "Sample Text 1",
"x": 35,
"y": 253,
"size": 20,
"pages": "0-"

This sample code and other cURL sample codes are available here.


Now let’s see this program in action.

Output using cURL
Output using cURL

The sample codes in JavaScript are available here.

The sample codes in Java are available here.

The sample codes in C# are available here.

The sample codes in Python are available here.

Sign Up

Related Samples: