> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pdf.co/llms.txt
> Use this file to discover all available pages before exploring further.

# PDF Add

> Add text, images, forms, other PDFs, fill forms, links to external sites and external PDF files. You can update or modify PDF and scanned PDF files.

## `POST /v1/pdf/edit/add`

Create new PDF forms with fillable edit boxes, checkboxes and other fillable fields.

Quickly create configs for [PDF.co](https://pdf.co/) API, [Zapier](https://zapier.com/), [Make with PDF.co PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper).

<Note>To add a signature, save the signature as an image and insert it using the images attribute.</Note>

## Attributes

<Note>Attributes are case-sensitive and should be inside JSON for POST request. for example: `{ "url": "https://example.com/file1.pdf" }`</Note>

| Attribute                       | Type           | Required | Default   | Description                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| ------------------------------- | -------------- | -------- | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `url`                           | string         | *Yes*    | -         | URL to the source file [`url` attribute](/api-reference/url-input-and-request-limits#supported-file-sources)                                                                                                                                                                                                                                                                                                                                                                            |
| `callback`                      | string         | *No*     | -         | The callback URL (or Webhook) used to receive the POST data. see [Webhooks & Callbacks](/api-reference/webhooks). This is only applicable when `async` is set to `true`.                                                                                                                                                                                                                                                                                                                |
| `httpusername`                  | string         | *No*     | -         | HTTP auth user name if required to access source URL.                                                                                                                                                                                                                                                                                                                                                                                                                                   |
| `httppassword`                  | string         | *No*     | -         | HTTP auth password if required to access source URL.                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| `password`                      | string         | *No*     | -         | Password for the PDF file.                                                                                                                                                                                                                                                                                                                                                                                                                                                              |
| `name`                          | string         | *No*     | -         | File name for the generated output, the input must be in string format.                                                                                                                                                                                                                                                                                                                                                                                                                 |
| `expiration`                    | integer        | *No*     | `60`      | Set the expiration time for the output link in minutes. After this specified duration, any generated output file(s) will be automatically deleted from [PDF.co Temporary Files Storage](/api-reference/file-upload/overview). The maximum duration for link expiration varies based on your current subscription plan. To store permanent input files (e.g. re-usable images, pdf templates, documents) consider using [PDF.co Built-In Files Storage](https://app.pdf.co/tools/files). |
| `inline`                        | boolean        | *No*     | `false`   | Set to `true` to return results inside the response. Otherwise, the endpoint will return a URL to the output file generated.                                                                                                                                                                                                                                                                                                                                                            |
| `async`                         | boolean        | *No*     | `false`   | Set `async` to `true` for long processes to run in the background, API will then return a `jobId` which you can use with the [Background Job Check endpoint](/api-reference/job-check). Also see [Webhooks & Callbacks](/api-reference/webhooks)                                                                                                                                                                                                                                        |
| `annotations`                   | array\[object] | *No*     | -         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|      `text`                     | string         | *Yes*    | -         | String to add, if you need to insert a line break then use \n or `{{$$newLine}}`. You can also use built-in macros like `{{$$PageNumber}}` and custom data macros.                                                                                                                                                                                                                                                                                                                      |
|      `x`                        | integer        | *Yes*    | -         | X coordinate (zero point is in the top left corner). [Use PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper) to measure coordinates.                                                                                                                                                                                                                                                                                                                                          |
|      `y`                        | integer        | *Yes*    | -         | Y coordinate (zero point is in the top left corner). [Use PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper) to measure coordinates.                                                                                                                                                                                                                                                                                                                                          |
|      `type`                     | string         | *No*     | `Text`    | Set object type. Available types: `text` = text object (default), `textField` = text input field, `TextFieldMultiline` = multiline fillable text field, `checkbox` = checkbox field.                                                                                                                                                                                                                                                                                                    |
|      `id`                       | string         | *No*     | -         | Sets id of the form field if type is not text.                                                                                                                                                                                                                                                                                                                                                                                                                                          |
|      `leading`                  | integer        | *No*     | -         | Sets a custom line height for text. The value defines the vertical spacing between lines. Larger values increase the space between lines, while smaller values tighten the spacing.                                                                                                                                                                                                                                                                                                     |
|      `width`                    | integer        | *No*     | -         | Width of the text box. Use [PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper) to measure pdf coordinates.                                                                                                                                                                                                                                                                                                                                                                    |
|      `height`                   | integer        | *No*     | -         | Height of the text box. Use [PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper) to measure pdf coordinates.                                                                                                                                                                                                                                                                                                                                                                   |
|      `alignment`                | string         | *No*     | `left`    | Sets text alignment within the width of the text box. Valid values: left, center, right. Default is left.                                                                                                                                                                                                                                                                                                                                                                               |
|      `pages`                    | string         | *No*     | -         | Specify page indices as comma-separated values or ranges to process (e.g. "0, 1, 2-" or "1, 2, 3-7"). The first-page index is 0, Use "!" before a number for inverted page numbers (e.g. "!0" for the last page). To process all pages, use "0-". If not specified, the default configuration processes all pages. The input must be in string format.                                                                                                                                  |
|      `color`                    | string         | *No*     | `#000000` | Sets the text color. Default is `#000000` (non-transparent black). Color in **RRGGBB** or **AARRGGBB** format where **AA** is the transparency component. For example, 50% transparent green is `#8000FF00`.                                                                                                                                                                                                                                                                            |
|      `link`                     | string         | *No*     | -         | Sets link on click for text.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|      `size`                     | integer        | *No*     | `12`      | Sets font size.                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|      `transparent`              | boolean        | *No*     | `true`    | Set to `false` to force disable any transparency and draw a white background under the text.                                                                                                                                                                                                                                                                                                                                                                                            |
|      `fontName`                 | string         | *No*     | `Arial`   | Set font name to use. Default is "Arial". See [availabe fonts](#available-fonts).                                                                                                                                                                                                                                                                                                                                                                                                       |
|      `fontBold`                 | boolean        | *No*     | `false`   | Set to `true` to enable bold font style.                                                                                                                                                                                                                                                                                                                                                                                                                                                |
|      `fontStrikeout`            | boolean        | *No*     | `false`   | Set to `true` to enable strikeout font style.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|      `fontUnderline`            | boolean        | *No*     | `false`   | Set to `true` to enable underline font style.                                                                                                                                                                                                                                                                                                                                                                                                                                           |
|      `RotationAngle`            | integer        | *No*     | `0`       | Set rotation angle in degrees. Default is `0` degrees.                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `images`                        | array\[object] | *No*     | -         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|      `url`                      | string         | *Yes*    | -         | URL to image or PDF as HTTP link, file token, or datauri:.. URL (with base64 encoded image).                                                                                                                                                                                                                                                                                                                                                                                            |
|      `x`                        | integer        | *Yes*    | -         | X coordinate (zero point is in the top left corner). Use [PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper) to measure coordinates.                                                                                                                                                                                                                                                                                                                                          |
|      `y`                        | integer        | *Yes*    | -         | Y coordinate (zero point is in the top left corner). Use [PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper) to measure pdf coordinates.                                                                                                                                                                                                                                                                                                                                      |
|      `width`                    | integer        | *No*     | -         | Width of the text box. Use [PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper) to measure pdf coordinates.                                                                                                                                                                                                                                                                                                                                                                    |
|      `height`                   | integer        | *No*     | -         | Height of the text box. Use [PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper) to measure pdf coordinates.                                                                                                                                                                                                                                                                                                                                                                   |
|      `pages`                    | string         | *No*     | -         | Specify page indices as comma-separated values or ranges to process (e.g. "0, 1, 2-" or "1, 2, 3-7"). The first-page index is 0, Use "!" before a number for inverted page numbers (e.g. "!0" for the last page). To process all pages, use "0-". If not specified, the default configuration processes all pages. The input must be in string format.                                                                                                                                  |
|      `link`                     | string         | *No*     | -         | Sets link on click for text.                                                                                                                                                                                                                                                                                                                                                                                                                                                            |
|      `keepAspectRatio`          | boolean        | *No*     | `true`    | Set to `false` if don’t need to keep the aspect ratio for the image or PDF added. In this case, it will use the width and height parameters provided.                                                                                                                                                                                                                                                                                                                                   |
| `fields`                        | array\[object] | *No*     | -         |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                         |
|      `fieldName`                | string         | *Yes*    | -         | Name of the form field. To find form fields please use [PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper).                                                                                                                                                                                                                                                                                                                                                                   |
|      `text`                     | string         | *Yes*    | -         | Value to set for this field. If you have a checkbox, set X, true, 1, or another text which is different from false to enable the checkbox. For radio buttons and combo boxes, you need to set the item value in text or index of the item to select. To find form fields please use [PDF Edit Add Helper](https://app.pdf.co/pdf-edit-add-helper).                                                                                                                                      |
|      `pages`                    | string         | *No*     | -         | Specify page indices as comma-separated values or ranges to process (e.g. "0, 1, 2-" or "1, 2, 3-7"). The first-page index is 0, Use "!" before a number for inverted page numbers (e.g. "!0" for the last page). To process all pages, use "0-". If not specified, the default configuration processes all pages. The input must be in string format.                                                                                                                                  |
|      `size`                     | integer        | *No*     | -         | Override the font size of the text inside the given input field.                                                                                                                                                                                                                                                                                                                                                                                                                        |
|      `fontName`                 | string         | *No*     | -         | Name of the font to use to fill out the input field.                                                                                                                                                                                                                                                                                                                                                                                                                                    |
|      `fontBold`                 | boolean        | *No*     | -         | Override font bold style of the text input field.                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|      `fontItalic`               | boolean        | *No*     | -         | Override font italic style of the text input field.                                                                                                                                                                                                                                                                                                                                                                                                                                     |
|      `fontStrikeout`            | boolean        | *No*     | -         | Override font strikeout style of the text input field.                                                                                                                                                                                                                                                                                                                                                                                                                                  |
|      `fontUnderline`            | boolean        | *No*     | -         | Override font underline style of the text input field.                                                                                                                                                                                                                                                                                                                                                                                                                                  |
| `annotationsString`             | string         | *No*     | -         | This parameter represents one or more text objects to add to a PDF. Each object is made of parameter separated by the `;` symbol.                                                                                                                                                                                                                                                                                                                                                       |
| `imagesString`                  | string         | *No*     | -         | Adds one or more images or other PDF objects on top of the source PDF. Each object is made of parameter separated by the `;` symbol.                                                                                                                                                                                                                                                                                                                                                    |
| [`fieldsString`](#fieldsstring) | string         | *No*     | -         | Set values for fillable PDF field objects. Each object is made of parameter separated by the `;` symbol. See [fieldsString](#fieldsstring) for more information.                                                                                                                                                                                                                                                                                                                        |
| `profiles`                      | object         | *No*     | -         | -                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       |
|     `outputDataFormat`          | string         | *No*     | -         | If you require your output as `base64` format, set this to `base64`                                                                                                                                                                                                                                                                                                                                                                                                                     |
|     `Pages[0].SetCropBox()`     | array\[string] | *No*     | -         | Crop a PDF file using an array to define the crop area. The crop box is defined by a rectangle \[x, y, width, height] in PDF points (1 Point = 1/72 inches).                                                                                                                                                                                                                                                                                                                            |
|     `DisableLigatures`          | boolean        | *No*     | `false`   | To disable ligaturization, for example for Hebrew, use the following:                                                                                                                                                                                                                                                                                                                                                                                                                   |
|     `FlattenDocument()`         | boolean        | *No*     | `false`   | Flattening a document renders it as read-only. Handy if you want to remove editing or copying capability.                                                                                                                                                                                                                                                                                                                                                                               |
|     `DataEncryptionAlgorithm`   | string         | *No*     | -         | Controls the encryption algorithm used for data encryption. See [User-Controlled Encryption](/knowledgebase/user-controlled-encryption) for more information. The available algorithms are: `AES128`, `AES192`, `AES256`.                                                                                                                                                                                                                                                               |
|     `DataEncryptionKey`         | string         | *No*     | -         | Controls the encryption key used for data encryption. See [User-Controlled Encryption](/knowledgebase/user-controlled-encryption) for more information.                                                                                                                                                                                                                                                                                                                                 |
|     `DataEncryptionIV`          | string         | *No*     | -         | Controls the encryption IV used for data encryption. See [User-Controlled Encryption](/knowledgebase/user-controlled-encryption) for more information.                                                                                                                                                                                                                                                                                                                                  |
|     `DataDecryptionAlgorithm`   | string         | *No*     | -         | Controls the decryption algorithm used for data decryption. See [User-Controlled Encryption](/knowledgebase/user-controlled-encryption) for more information. The available algorithms are: `AES128`, `AES192`, `AES256`.                                                                                                                                                                                                                                                               |
|     `DataDecryptionKey`         | string         | *No*     | -         | Controls the decryption key used for data decryption. See [User-Controlled Encryption](/knowledgebase/user-controlled-encryption) for more information.                                                                                                                                                                                                                                                                                                                                 |
|     `DataDecryptionIV`          | string         | *No*     | -         | Controls the decryption IV used for data decryption. See [User-Controlled Encryption](/knowledgebase/user-controlled-encryption) for more information.                                                                                                                                                                                                                                                                                                                                  |

### fieldsString

Set values for fillable PDF fields (i.e. fill pdf fields in pdf forms). To fill fields in PDF form, use the following format: `page;fieldName;value`.

Also, the advanced format can be used to override font name, size and style:

`0;fieldName;Field Text;12+bold+italic+underline+strikeout;FontName`

Where:
`0;editbox1;text is here;12+bold;Arial`

To fill the checkbox, use true, for example: `0;checkbox1;true`.

To separate multiple objects, use the `|` separator. To get the list of all fillable fields in a PDF form, use the :ref:post-tag-pdf-info-fields endpoint. If you need to include a pipe character within a value, escape it by prefixing with `\\` (for example, `|` should be written as `\\|` and in a JSON string as `\\|`).

### Crop a PDF File

Crop a **PDF** file using an array to define the crop area. The crop box is defined by a rectangle `[x, y, width, height]` in **PDF** points (1 Point = 1/72 inches).

<Note>An A4 page size in points is **595 x 842**</Note>

```json theme={null}
{
 "profiles": "{ 'Pages[0].SetCropBox()': ['28', '28', '539', '786'] }"
}
```

### Disable Ligaturization

To disable ligaturization, for example for Hebrew, use the following:

```json theme={null}
{
 "profiles": "{ 'DisableLigatures': true }"
}
```

### Flatten Document

Flattening a document renders it as *read-only*. Handy if you want to remove editing or copying capability.

```json theme={null}
{
 "profiles": "{ 'FlattenDocument()': [] }"
}
```

## Available fonts

### Standard Fonts

* Arial
* Arial Black
* Aptos
* Aptos Display
* Aptos Narrow
* Bahnschrift
* Calibri
* Cambria
* Cambria Math
* Candara
* Comic Sans MS
* Consolas
* Constantia
* Corbel
* Courier New
* Ebrima
* Franklin Gothic Medium
* Gabriola
* Gadugi
* Georgia
* HoloLens MDL2 Assets
* Impact
* Ink Free
* Javanese Text
* Leelawadee UI
* Lucida Console
* Lucida Sans Unicode
* Malgun Gothic
* Marlett
* Microsoft Himalaya
* Microsoft JhengHei
* Microsoft New Tai Lue
* Microsoft PhagsPa
* Microsoft Sans Serif
* Microsoft Tai Le
* Microsoft YaHei
* Montserrat
* Microsoft Yi Baiti
* MingLiU-ExtB
* Mongolian Baiti
* MS Gothic
* MV Boli
* Myanmar Text
* OCR A
* OCR A Extended
* OCR B
* OCR B E
* OCR B F
* OCR B L
* OCR B S
* OCR X S
* Nirmala UI
* Palatino Linotype
* Segoe MDL2 Assets
* Segoe Print
* Segoe Script
* Segoe UI
* Segoe UI Historic
* Segoe UI Emoji
* Segoe UI Symbol
* SimSun
* Sitka
* Sylfaen
* Symbol
* Tahoma
* Times New Roman
* Trebuchet MS
* Verdana
* Webdings
* Wingdings
* Yu Gothic

### Japanese Fonts

* MS Gothic
* MS Mincho
* Yu Gothic

### Chinese Fonts

* SimSun
* MingLiU
* Microsoft YaHei

### Korean Fonts

* Malgun Gothic

### Hebrew Fonts

* Miriam

### Arabic Fonts

* Aldhabi
* Andalus
* Arabic Typesetting

## Query parameters

*No query parameters accepted.*

## Responses

| Parameter             | Type    | Description                                                                                                                  |
| --------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------- |
| `hash`                | string  | Hash of the final PDF file stored in S3.                                                                                     |
| `url`                 | string  | Direct URL to the final PDF file stored in S3.                                                                               |
| `error`               | boolean | Indicates whether an error occurred (`false` means success)                                                                  |
| `pageCount`           | integer | Number of pages in the PDF document.                                                                                         |
| `status`              | string  | Status code of the request (200, 404, 500, etc.). For more information, see [Response Codes](/api-reference/response-codes). |
| `name`                | string  | Name of the output file                                                                                                      |
| `remainingCredits`    | integer | Number of credits remaining in the account                                                                                   |
| `credits`             | integer | Number of credits consumed by the request                                                                                    |
| `duration`            | integer | Time taken for the operation in milliseconds                                                                                 |
| `outputLinkValidTill` | string  | Timestamp indicating when the output link will expire                                                                        |

## `Example` Payload (A)

<Note>To see the request size limits, please refer to the [Request Size Limits](/api-reference/url-input-and-request-limits#pdf-co-request-size).</Note>

```json theme={null}
{
  "async": false,
  "inline": true,
  "name": "f1040-form-filled",
  "url": "pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-form/f1040.pdf",
  "annotationsString": "250;20;0-;PDF form filled with PDF.co API;24+bold+italic+underline+strikeout;Arial;FF0000;www.pdf.co;true",
  "imagesString": "100;180;0-;pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/logo.png|400;180;0-;pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/logo.png;www.pdf.co;200;200",
  "fieldsString": "1;topmostSubform[0].Page1[0].f1_02[0];John A. Doe|1;topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1];true|1;topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0];123456789"
}
```

## `Example` Response (A)

<Note>To see the main response codes, please refer to the [Response Codes](/api-reference/response-codes) page.</Note>

```json theme={null}
{
  "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/0c336bfcef1a473d98492bda25d8da03/newDocument.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzEO7%2F%2F%2F%2F%2F%2F%2F%2F%2F%2FwEaDHWK1dY4d4lOgsheliKBATwE%2FZewASPTEnPxTn%2BOdYhP4h3gljAJfqbRvQptDX7wdWLmrBS7Tg4qTU6pAbxIdXChGPjBWpSbtiADJKmqkmyhkUmE8GSM1%2FGtJO6bga2pgzvFLXmzxjTf3%2BFNqwYOvbyApIZdVLoPpEKY6PlCflQtLTd30dhelm6xpB8pitbdhSjdz8KCBjIobVy%2Fjwybwp6OQgB%2FT6QkIo2dU07gtFREdn5jhRyvnS5lkccweBV1%2Bw%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHMV5P3JOS/20210316/us-west-2/s3/aws4_request&X-Amz-Date=20210316T124309Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=95287bf3c007fed4c2c5aeea1ce75c846cc6c68b22aaf35175ebe41a105f54e1",
  "pageCount": 1,
  "error": false,
  "status": 200,
  "name": "newDocument",
  "remainingCredits": 9913694,
  "credits": 3
}
```

## `Example` Payload (B)

<Note>To see the request size limits, please refer to the [Request Size Limits](/api-reference/url-input-and-request-limits#pdf-co-request-size).</Note>

```json theme={null}
{
  "async": false,
  "inline": true,
  "name": "newDocument",
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/sample.pdf",
  "annotations": [
    {
      "text": "Sample Text 1",
      "x": 150,
      "y": 100,
      "size": 20,
      "pages": "0-"
    },
    {
      "text": "sample text that is centered (can also set right or left alignment) ",
      "x": "10",
      "y": "10",
      "width": "500",
      "height": "200",
      "size": "7",
      "pages": "0",
      "alignment": "center"
    },
    {
      "text": "Sample Text 2 - Click here to test link\r\n(CLICK ME!)",
      "x": 250,
      "y": 240,
      "size": 24,
      "pages": "0-",
      "color": "CCBBAA",
      "link": "https://pdf.co/",
      "fontName": "Comic Sans MS",
      "fontItalic": true,
      "fontBold": true,
      "fontStrikeout": false,
      "fontUnderline": true
    },
    {
      "text": "Simple text 3",
      "x": 100,
      "y": 230,
      "size": 12,
      "pages": "0-",
      "type": "Text"
    },
    {
      "text": "sample text 3 - input text field",
      "x": 100,
      "y": 170,
      "size": 16,
      "pages": "0-",
      "type": "TextField",
      "id": "textfield1"
    },
    {
      "x": 200,
      "y": 120,
      "size": 16,
      "pages": "0-",
      "type": "Checkbox",
      "id": "checkbox2"
    },
    {
      "x": 200,
      "y": 140,
      "size": 16,
      "pages": "0-",
      "type": "CheckboxChecked",
      "id": "checkbox3"
    }
  ],
  "images": [
    {
      "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/logo.png",
      "x": 270,
      "y": 150,
      "width": 159,
      "height": 43,
      "pages": "0"
    },
    {
      "url": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgMAAAEtCAYAAACVlWOMAAAgAElEQVR4Xu3dCXxkVZn38f9zK72wiCjdgEInadx1RnFkHDckCQiiIi7grqDMNEmQAXV05p1XBcdlXEFHuxN6FFF5RwUXcGNPAoq7CKKOG3SSRhS6W5ul6Sbpus/7OZWq5FZ1JankJuncvr/6fOYzM6Tuued879N1n3vuWUx8EEAAAQQQQCDXApbr1tN4BBBAAAEEEBDJAEGAAAIIIIBAzgVIBnIeADQfAQQQQAABkgFiAA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AABBBBAINsCJAPZvn7UHgEEEEAAgdQCJAOpCSkAAQQQQACBbAuQDGT7+lF7BBBAAAEEUguQDKQmpAAEEEAAAQSyLUAykO3rR+0RQAABBBBILUAykJqQAhBAAAEEEMi2AMlAtq8ftUcAAQQQQCC1AMlAakIKQAABBBBAINsCJAPZvn7UHgEEEEAAgdQCJAOpCSkAAQQQQACBbAuQDGT7+lF7BBBAAAEEUgv8fwA4c3jZPFf8AAAAAElFTkSuQmCC",
      "x": 10,
      "y": 230,
      "pages": "0-"
    }
  ]
}
```

## `Example` Response (B)

<Note>To see the main response codes, please refer to the [Response Codes](/api-reference/response-codes) page.</Note>

```json theme={null}
{
  "url": "https://pdf-temp-files.s3.amazonaws.com/03c5c55183c74f8d94a4ec952e4e32ad/f1040-form-filled.pdf",
  "pageCount": 3,
  "error": false,
  "status": 200,
  "name": "f1040-form-filled",
  "remainingCredits": 60822
}
```

<Note>
  **Inconsistent URL Encoding in cURL Output:** When using cURL to make API requests, the output JSON may show URL characters encoded as Unicode escape sequences. For example, the ampersand character (`&`) may appear as `\u0026` in the cURL output. This is normal JSON encoding behavior and does not affect the validity of the URL. The URL will function correctly when used, as JSON parsers automatically decode these escape sequences. If you're parsing the response programmatically, your JSON parser will handle this conversion automatically.
</Note>

## Code Samples

<Tabs>
  <Tab title="CURL (1)">
    ```bash theme={null}
    curl --location --request POST 'https://api.pdf.co/v1/pdf/edit/add' \
    --header 'Content-Type: application/json' \
    --header 'x-api-key: *******************' \
    --data-raw '{
    "async": false,
    "inline": true,
    "name": "newDocument",
    "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/sample.pdf",
    "annotations": [
    {
    "text": "Sample Text 1",
    "x": 150,
    "y": 100,
    "size": 20,
    "pages": "0-"
    },
    {
    "text": "sample text that is centered (can also set right or left alignment) ",
    "x": "10",
    "y": "10",
    "width": "500",
    "height": "200",
    "size": "7",
    "pages": "0",
    "alignment": "center"
    },
    {
    "text": "Sample Text 2 - Click here to test link\r\n(CLICK ME!)",
    "x": 250,
    "y": 240,
    "size": 24,
    "pages": "0-",
    "color": "CCBBAA",
    "link": "https://pdf.co/",
    "fontName": "Comic Sans MS",
    "fontItalic": true,
    "fontBold": true,
    "fontStrikeout": false,
    "fontUnderline": true
    },
    {
    "text": "Simple text 3",
    "x": 100,
    "y": 230,
    "size": 12,
    "pages": "0-",
    "type": "Text"
    },
    {
    "text": "sample text 3 - input text field",
    "x": 100,
    "y": 170,
    "size": 16,
    "pages": "0-",
    "type": "TextField",
    "id": "textfield1"
    },
    {
    "x": 200,
    "y": 120,
    "size": 16,
    "pages": "0-",
    "type": "Checkbox",
    "id": "checkbox2"
    },
    {
    "x": 200,
    "y": 140,
    "size": 16,
    "pages": "0-",
    "type": "CheckboxChecked",
    "id": "checkbox3"
    }
    ```
  </Tab>

  <Tab title="CURL (2)">
    ```bash theme={null}
    curl --location --request POST 'https://api.pdf.co/v1/pdf/edit/add' \
    --header 'Content-Type: application/json' \
    --header 'x-api-key: *******************' \
    --data-raw '{
    "async": false,
    "inline": true,
    "name": "f1040-form-filled",
    "url": "pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-form/f1040.pdf",
    "annotationsString": "250;20;0-;PDF form filled with PDF.co API;24+bold+italic+underline+strikeout;Arial;FF0000;www.pdf.co;true",
    "imagesString": "100;180;0-;pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/logo.png|400;180;0-;pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/logo.png;www.pdf.co;200;200",
    "fieldsString": "1;topmostSubform[0].Page1[0].f1_02[0];John A. Doe|1;topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1];true|1;topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0];123456789"
    }'
    ```
  </Tab>

  <Tab title="JavaScript/Node.js">
    ```javascript theme={null}
    var https = require("https");
    var path = require("path");
    var fs = require("fs");

    // The authentication key (API Key).
    // Get your own by registering at https://app.pdf.co
    const API_KEY = "***********************************";

    // Direct URL of source PDF file.
    // You can also upload your own file into PDF.co and use it as url. Check "Upload File" samples for code snippets: https://github.com/bytescout/pdf-co-api-samples/tree/master/File%20Upload/
    const SourceFileUrl = "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf";

    // Comma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'.
    const Pages = "";

    // PDF document password. Leave empty for unprotected documents.
    const Password = "";

    // Destination PDF file name
    const DestinationFile = "./result.pdf";

    // Text annotation params
    const Type = "annotation";
    const X = 400;
    const Y = 600;
    const Text = "APPROVED";
    const FontName = "Times New Roman";
    const FontSize = 24;
    const Color = "FF0000";

    // * Add Text *
    // Prepare request to `PDF Edit` API endpoint
    var queryPath = `/v1/pdf/edit/add`;

    // JSON payload for api request
    var jsonPayload = JSON.stringify({
        name: path.basename(DestinationFile),
        url: SourceFileUrl,
        password: Password,
        annotations:[
            {
                pages: Pages,
                x: X,
                y: Y,
                text: Text,
                fontname: FontName,
                size: FontSize,
                color: Color
            }
        ]
    });

    var reqOptions = {
        host: "api.pdf.co",
        method: "POST",
        path: encodeURI(queryPath),
        headers: {
            "x-api-key": API_KEY,
            "Content-Type": "application/json",
            "Content-Length": Buffer.byteLength(jsonPayload, 'utf8')
        }
    };

    // Send request
    var postRequest = https.request(reqOptions, (response) => {
        response.on("data", (d) => {
            // Parse JSON response
            var data = JSON.parse(d);

            if (data.error == false) {
                // Download the output file
                var file = fs.createWriteStream(DestinationFile);
                https.get(data.url, (response2) => {
                    response2.pipe(file).on("close", () => {
                        console.log(`Generated PDF file saved to '${DestinationFile}' file.`);
                    });
                });
            }
            else {
                // Service reported error
                console.log(data.message);
            }
        });
    }).on("error", (e) => {
        // Request error
        console.error(e);
    });

    // Write request data
    postRequest.write(jsonPayload);
    postRequest.end();
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    <?php

      $curl = curl_init();

      curl_setopt_array($curl, array(
        CURLOPT_URL => 'https://api.pdf.co/v1/pdf/edit/add',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS =>'{
          "async": false,
          "encrypt": false,
          "inline": true,
          "name": "f1040-form-filled",
          "url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf",
          "annotationsString": "250;20;0-;PDF form filled with PDF.co API;24+bold+italic+underline+strikeout;Arial;FF0000;www.pdf.co;true",
          "imagesString": "100;180;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png|400;180;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png;www.pdf.co;200;200",
          "fieldsString": "1;topmostSubform[0].Page1[0].f1_02[0];John A. Doe|1;topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1];true|1;topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0];123456789"
      }',
        CURLOPT_HTTPHEADER => array(
          'Content-Type: application/json',
          'x-api-key: '
        ),
      ));

      $response = curl_exec($curl);

      curl_close($curl);
      echo $response;

    ?>
    ```
  </Tab>

  <Tab title="C#">
    ```csharp theme={null}
    using Newtonsoft.Json.Linq;
    using System;
    using System.Globalization;
    using System.IO;
    using System.Net;

    namespace PDFcoApiExample
    {
        class Program
      {
        // The authentication key (API Key).
        // Get your own by registering at https://app.pdf.co
        const String API_KEY = "*****************************************";

        // Direct URL of source PDF file.
        // You can also upload your own file into PDF.co and use it as url. Check "Upload File" samples for code snippets: https://github.com/bytescout/pdf-co-api-samples/tree/master/File%20Upload/
        const string SourceFileUrl = "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf";
        // Comma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'.
        const string Pages = "";
        // PDF document password. Leave empty for unprotected documents.
        const string Password = "";

        // Destination PDF file name
        const string DestinationFile = @".\result.pdf";

        // Text annotation params
        const string Type = "annotation";
        const int X = 400;
        const int Y = 600;
        const string Text = "APPROVED";
        const string FontName = "Times New Roman";
        const float FontSize = 24;
        const string FontColor = "FF0000";


        static void Main(string[] args)
        {
          // Create standard .NET web client instance
          WebClient webClient = new WebClient();

          // Set API Key
          webClient.Headers.Add("x-api-key", API_KEY);

          // * Add text annotation *

          // Prepare requests params as JSON
          // See documentation: https://developer.pdf.co
                string jsonPayload = $@"{{
        ""name"": ""{Path.GetFileName(DestinationFile)}"",
        ""url"": ""{SourceFileUrl}"",
        ""password"": ""{Password}"",
        ""annotations"": [
            {{
                ""x"": {X},
                ""y"": {Y},
                ""text"": ""{Text}"",
                ""fontname"": ""{FontName}"",
                ""size"": ""{FontSize.ToString(CultureInfo.InvariantCulture)}"",
                ""color"": ""{FontColor}"",
                ""pages"": ""{Pages}""
            }}
        ]
    }}"; ;

          try
          {
            // URL of "PDF Edit" endpoint
            string url = "https://api.pdf.co/v1/pdf/edit/add";

            // Execute POST request with JSON payload
            string response = webClient.UploadString(url, jsonPayload);

            // Parse JSON response
            JObject json = JObject.Parse(response);

            if (json["error"].ToObject<bool>() == false)
            {
              // Get URL of generated PDF file
              string resultFileUrl = json["url"].ToString();

                        // Download generated PDF file
              webClient.DownloadFile(resultFileUrl, DestinationFile);

              Console.WriteLine("Generated PDF file saved as \"{0}\" file.", DestinationFile);
            }
            else
            {
              Console.WriteLine(json["message"].ToString());
            }
          }
          catch (WebException e)
          {
            Console.WriteLine(e.ToString());
          }
                finally
                {
                    webClient.Dispose();
                }

                Console.WriteLine();
          Console.WriteLine("Press any key...");
          Console.ReadKey();
        }
      }
    }
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    package com.company;

    import com.google.gson.JsonObject;
    import com.google.gson.JsonParser;
    import okhttp3.*;

    import java.io.*;
    import java.net.*;
    import java.nio.file.Path;
    import java.nio.file.Paths;

    public class Main
    {
        // The authentication key (API Key).
        // Get your own by registering at https://app.pdf.co
        final static String API_KEY = "***********************************";

        // Direct URL of source PDF file.
        // You can also upload your own file into PDF.co and use it as url. Check "Upload File" samples for code snippets: https://github.com/bytescout/pdf-co-api-samples/tree/master/File%20Upload/
        final static String SourceFileUrl = "https://bytescout-com.s3.amazonaws.com/files/demo-files/cloud-api/pdf-edit/sample.pdf";
        // Comma-separated list of page indices (or ranges) to process. Leave empty for all pages. Example: '0,2-5,7-'.
      final static String Pages = "";
        // PDF document password. Leave empty for unprotected documents.
      final static String Password = "";

        // Destination PDF file name
      final static Path ResultFile = Paths.get(".\\result.pdf");

        // Text annotation params
        private final static String Type2 = "annotation";
        private final static int X2 = 400;
        private final static int Y2 = 600;
        private final static String Text = "APPROVED";
        private final static String FontName = "Times New Roman";
        private final static float FontSize = 24;
        private final static String Color = "FF0000";

        public static void main(String[] args) throws IOException
        {
            // Create HTTP client instance
            OkHttpClient webClient = new OkHttpClient();

            // * Add text annotation *
            // Prepare URL for `PDF Edit` API call
            String query = "https://api.pdf.co/v1/pdf/edit/add";

            // Make correctly escaped (encoded) URL
            URL url = null;
            try
            {
                url = new URI(null, query, null).toURL();
            }
            catch (URISyntaxException e)
            {
                e.printStackTrace();
            }

            // Create JSON payload
            String jsonPayload = String.format("{
                \"name\": \"%s\",
                \"url\": \"%s\",
                \"password\": \"%s\",
                annotations:[{
                    \"pages\": \"%s\",
                    \"text\": \"%s\",
                    \"x\": \"%s\",
                    \"y\": \"%s\",
                    \"fontname\": \"%s\",
                    \"size\": \"%s\",
                    \"color\": \"%s\"
                }]
            }",
                ResultFile.getFileName(),
                SourceFileUrl,
                Password,
                Pages,
                Text,
                X2,
                Y2,
                FontName,
                FontSize,
                Color);

            // Prepare request body
            RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonPayload);

            // Prepare request
            Request request = new Request.Builder()
                .url(url)
                .addHeader("x-api-key", API_KEY) // (!) Set API Key
                .addHeader("Content-Type", "application/json")
                .post(body)
                .build();

            // Execute request
            Response response = webClient.newCall(request).execute();

            if (response.code() == 200)
            {
                // Parse JSON response
                JsonObject json = new JsonParser().parse(response.body().string()).getAsJsonObject();

                boolean error = json.get("error").getAsBoolean();
                if (!error)
                {
                    // Get URL of generated output file
                    String resultFileUrl = json.get("url").getAsString();

                    // Download the image file
                    downloadFile(webClient, resultFileUrl, ResultFile);

                    System.out.printf("Generated file saved to \"%s\" file.", ResultFile.toString());
                }
                else
                {
                    // Display service reported error
                    System.out.println(json.get("message").getAsString());
                }
            }
            else
            {
                // Display request error
                System.out.println(response.code() + " " + response.message());
            }
        }

        public static void downloadFile(OkHttpClient webClient, String url, Path destinationFile) throws IOException
        {
            // Prepare request
            Request request = new Request.Builder()
                    .url(url)
                    .build();
            // Execute request
            Response response = webClient.newCall(request).execute();

            byte[] fileBytes = response.body().bytes();

            // Save downloaded bytes to file
            OutputStream output = new FileOutputStream(destinationFile.toFile());
            output.write(fileBytes);
            output.flush();
            output.close();

            response.close();
        }
    }
    ```
  </Tab>

  <Tab title="PHP">
    ```php theme={null}
    <?php

      $curl = curl_init();

      curl_setopt_array($curl, array(
        CURLOPT_URL => 'https://api.pdf.co/v1/pdf/edit/add',
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => '',
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 0,
        CURLOPT_FOLLOWLOCATION => true,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => 'POST',
        CURLOPT_POSTFIELDS =>'{
          "async": false,
          "encrypt": false,
          "inline": true,
          "name": "f1040-form-filled",
          "url": "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf",
          "annotationsString": "250;20;0-;PDF form filled with PDF.co API;24+bold+italic+underline+strikeout;Arial;FF0000;www.pdf.co;true",
          "imagesString": "100;180;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png|400;180;0-;bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-edit/logo.png;www.pdf.co;200;200",
          "fieldsString": "1;topmostSubform[0].Page1[0].f1_02[0];John A. Doe|1;topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1];true|1;topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0];123456789"
      }',
        CURLOPT_HTTPHEADER => array(
          'Content-Type: application/json',
          'x-api-key: '
        ),
      ));

      $response = curl_exec($curl);

      curl_close($curl);
      echo $response;

    ?>
    ```
  </Tab>
</Tabs>

***

## Create Fillable PDF Forms

You can create fillable PDF forms by adding editable text boxes and checkboxes.

By using the [annotations\[\]](/api-reference/pdf-add#pdf-add-annotations) attribute and setting the type to textfield or checkbox you can create form elements to be placed on your PDF .

### `Example` Payload (Create Fillable PDF Forms)

```json theme={null}
{
    "async": false,
    "inline": true,
    "name": "newDocument",
    "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/sample.pdf",
    "annotations":[
       {
            "text":"sample prefilled text",
            "x": 10,
            "y": 30,
            "size": 12,
            "pages": "0-",
            "type": "TextField",
            "id": "textfield1"
        },
        {
            "x": 100,
            "y": 150,
            "size": 12,
            "pages": "0-",
            "type": "Checkbox",
            "id": "checkbox2"
        },
        {
            "x": 100,
            "y": 170,
            "size": 12,
            "pages": "0-",
            "link": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/logo.png",
            "type": "CheckboxChecked",
            "id":"checkbox3"
        }

    ]
}
```

### `Example` Response (Create Fillable PDF Forms)

```json theme={null}
{
    "url": "https://pdf-temp-files.s3-us-west-2.amazonaws.com/d5c6efa549194ffaacb2eedd318e0320/newDocument.pdf?X-Amz-Expires=3600&x-amz-security-token=FwoGZXIvYXdzECMaDJJV7qKrpnGUrZHrwSKBATR5rxVlQoU0zj3r4jyHPt7yj4HoCIBi65IbMRWVX8qZZtKL9YGUzP%2FcemlqVd4Vi5%2B80Sg%2BymqQtaQ8qSFqKA82JnV%2BNBDatIigZIZha%2BrQM3jSC%2FZhX1zxsfLLsaH3K5nBnkjT3gi%2FZnx%2FgqrlIhf3m2xRFaTlgHrBADlK9KKPIijSusD4BTIo%2FQ433xx%2FQEaGWdX0nu4NuiByyXNPsBCAI3im9LMUCujjqF79ocyLHA%3D%3D&X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIA4NRRSZPHCSWKUQ4T/20200716/us-west-2/s3/aws4_request&X-Amz-Date=20200716T092641Z&X-Amz-SignedHeaders=host;x-amz-security-token&X-Amz-Signature=2aa88d39aaf4b5891e4cb42d5675a64486098558d7159b37b75252209bdd6a95",
    "pageCount": 1,
    "error": false,
    "status": 200,
    "name": "newDocument",
    "remainingCredits": 77762
}
```

### CURL

```bash theme={null}
curl --location --request POST 'https://api.pdf.co/v1/pdf/edit/add' \
--header 'Content-Type: application/json' \
--header 'x-api-key: *******************' \
--data-raw '{
    "async": false,
        "inline": true,
    "name": "newDocument",
    "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/sample.pdf",
    "annotations":[
       {
            "text":"sample prefilled text",
            "x": 10,
            "y": 30,
            "size": 12,
            "pages": "0-",
            "type": "TextField",
            "id": "textfield1"
        },
        {
            "x": 100,
            "y": 150,
            "size": 12,
            "pages": "0-",
            "type": "Checkbox",
            "id": "checkbox2"
        },
        {
            "x": 100,
            "y": 170,
            "size": 12,
            "pages": "0-",
            "link": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-edit/logo.png",
            "type": "CheckboxChecked",
            "id":"checkbox3"
        }

    ]
}'
```

## Fill PDF Forms

You can fill existing form fields in a PDF after identifying the form field names.

Once form fields are identified then the [fields\[\]](#:~:text=height%20parameters%20provided.-,fields,-array%5Bobject%5D) attribute should be used to populate the fields by fieldName .

### `Example` Payload (Fill PDF Forms)

```json theme={null}
{
  "async": false,
  "inline": true,
  "name": "f1040-filled",
  "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-form/f1040.pdf",
  "fields": [
      {
          "fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]",
          "pages": "1",
          "text": "True"
      },
      {

          "fieldName": "topmostSubform[0].Page1[0].f1_02[0]",
          "pages": "1",
          "text": "John A."
      },
      {

          "fieldName": "topmostSubform[0].Page1[0].f1_03[0]",
          "pages": "1",
          "text": "Doe"
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]",
          "pages": "1",
          "text": "123456789"
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
          "pages": "1",
          "text": "Joan B.",
          "fontName": "Arial",
          "size": 6,
          "fontBold": true,
          "fontItalic": true,
          "fontStrikeout": true,
          "fontUnderline": true
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
          "pages": "1",
          "text": "Joan B."
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]",
          "pages": "1",
          "text": "Doe"
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_07[0]",
          "pages": "1",
          "text": "987654321"
      }
  ]
```

### `Example` Response (Fill PDF Forms)

```json theme={null}
{
    "hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "url": "https://pdf-temp-files.s3.amazonaws.com/cd15a09771554bed88d6419c1e2f2b16/f1040-filled.pdf",
    "pageCount": 3,
    "error": false,
    "status": 200,
    "name": "f1040-filled.pdf",
    "remainingCredits": 99999369,
    "credits": 63
}
```

### CURL

```bash theme={null}
curl --location --request POST 'https://api.pdf.co/v1/pdf/edit/add' \
--header 'Content-Type: application/json' \
--header 'x-api-key: *******************' \
--data-raw '{
    "async": false,
    "inline": true,
    "name": "f1040-filled",
    "url": "https://pdfco-test-files.s3.us-west-2.amazonaws.com/pdf-form/f1040.pdf",
    "fields": [
        {
            "fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]",
            "pages": "1",
            "text": "True"
        },
        {

            "fieldName": "topmostSubform[0].Page1[0].f1_02[0]",
            "pages": "1",
            "text": "John A."
        },
        {

            "fieldName": "topmostSubform[0].Page1[0].f1_03[0]",
            "pages": "1",
            "text": "Doe"
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]",
            "pages": "1",
            "text": "123456789"
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
            "pages": "1",
            "text": "Joan B.",
            "fontName": "Arial",
            "size": 6,
            "fontBold": true,
            "fontItalic": true,
            "fontStrikeout": true,
            "fontUnderline": true
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
            "pages": "1",
            "text": "Joan B."
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]",
            "pages": "1",
            "text": "Doe"
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_07[0]",
            "pages": "1",
            "text": "987654321"
        }
    ],
    "annotations":[
        {
            "text":"Sample Filled with PDF.co API using /pdf/edit/add. Get fields from forms using /pdf/info/fields. This text is be added on the first (0) and the last (!0) pages.",
            "x": 400,
            "y": 10,
            "width": 200,
            "height": 500,
            "size": 12,
            "pages": "0-",
            "color": "FF0000",
            "link": "https://pdf.co"
        }
    ]
  }'
```

### Code samples (For Fill PDF Forms)

<Tabs>
  <Tab title="JavaScript/Node.js">
    ```javascript theme={null}
    var https = require("https");
    var path = require("path");
    var fs = require("fs");

    // The authentication key (API Key).
    // Get your own by registering at https://app.pdf.co
    const API_KEY = "***********************************";

    // Direct URL of source PDF file.
    const SourceFileUrl = "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf";

    // PDF document password. Leave empty for unprotected documents.
    const Password = "";

    // Destination PDF file name
    const DestinationFile = "./result.pdf";

    // Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working, failed, aborted and success). Must be one of: true, false.
    const async = false;

    // Form field data
    var fields = [
        {
            "fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]",
            "pages": "1",
            "text": "True"
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].f1_02[0]",
            "pages": "1",
            "text": "John A."
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].f1_03[0]",
            "pages": "1",
            "text": "Doe"
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]",
            "pages": "1",
            "text": "123456789"
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
            "pages": "1",
            "text": "Joan B."
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
            "pages": "1",
            "text": "Joan B."
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]",
            "pages": "1",
            "text": "Doe"
        },
        {
            "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_07[0]",
            "pages": "1",
            "text": "987654321"
        }
    ];

    // * Fill forms *
    // Prepare request to `PDF Edit` API endpoint
    var queryPath = `/v1/pdf/edit/add`;

    // JSON payload for api request
    var jsonPayload = JSON.stringify({
        name: path.basename(DestinationFile),
        password: Password,
        url: SourceFileUrl,
        async: async,
        fields: fields
    });

    var reqOptions = {
        host: "api.pdf.co",
        method: "POST",
        path: queryPath,
        headers: {
            "x-api-key": API_KEY,
            "Content-Type": "application/json",
            "Content-Length": Buffer.byteLength(jsonPayload, 'utf8')
        }
    };
    // Send request
    var postRequest = https.request(reqOptions, (response) => {
        response.on("data", (d) => {
            // Parse JSON response
            var data = JSON.parse(d);

            if (data.error == false) {
                // Download the PDF file
                var file = fs.createWriteStream(DestinationFile);
                https.get(data.url, (response2) => {
                    response2.pipe(file).on("close", () => {
                        console.log(`Generated PDF file saved to '${DestinationFile}' file.`);
                    });
                });
            }
            else {
                // Service reported error
                console.log(data.message);
            }
        });
    }).on("error", (e) => {
        // Request error
        console.error(e);
    });

    // Write request data
    postRequest.write(jsonPayload);
    postRequest.end();
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
    import os
    import requests # pip install requests

    # The authentication key (API Key).
    # Get your own by registering at https://app.pdf.co
    API_KEY = "**************************************"

    # Base URL for PDF.co Web API requests
    BASE_URL = "https://api.pdf.co/v1"

    def main(args = None):
        fillPDFForm()

    def fillPDFForm():
        """Fill PDF form using PDF.co Web API"""

        # Prepare requests params as JSON
        # See documentation: https://developer.pdf.co
        payload = "{\n    \"async\": false,\n    \"encrypt\": false,\n    \"name\": \"f1040-filled\",\n    \"url\": \"https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf\",\n    \"fields\": [\n        {\n            \"fieldName\": \"topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]\",\n            \"pages\": \"1\",\n            \"text\": \"True\"\n        },\n        {\n            \"fieldName\": \"topmostSubform[0].Page1[0].f1_02[0]\",\n            \"pages\": \"1\",\n            \"text\": \"John A.\"\n        },        \n        {\n            \"fieldName\": \"topmostSubform[0].Page1[0].f1_03[0]\",\n            \"pages\": \"1\",\n            \"text\": \"Doe\"\n        },        \n        {\n            \"fieldName\": \"topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]\",\n            \"pages\": \"1\",\n            \"text\": \"123456789\"\n        },\n        {\n            \"fieldName\": \"topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]\",\n            \"pages\": \"1\",\n            \"text\": \"Joan B.\"\n        },\n        {\n            \"fieldName\": \"topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]\",\n            \"pages\": \"1\",\n            \"text\": \"Joan B.\"\n        },\n        {\n            \"fieldName\": \"topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]\",\n            \"pages\": \"1\",\n            \"text\": \"Doe\"\n        },\n        {\n            \"fieldName\": \"topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_07[0]\",\n            \"pages\": \"1\",\n            \"text\": \"987654321\"\n        }     \n\n\n\n    ],\n    \"annotations\":[\n        {\n            \"text\":\"Sample Filled with PDF.co API using /pdf/edit/add. Get fields from forms using /pdf/info/fields\",\n            \"x\": 10,\n            \"y\": 10,\n            \"size\": 12,\n            \"pages\": \"0-\",\n            \"color\": \"FFCCCC\",\n            \"link\": \"https://pdf.co\"\n        }\n    ],    \n    \"images\": [        \n    ]\n}"

        # Prepare URL for 'Fill PDF' API request
        url = "{}/pdf/edit/add".format(BASE_URL)

        # Execute request and get response as JSON
        response = requests.post(url, data=payload, headers={"x-api-key": API_KEY, 'Content-Type': 'application/json'})
        if (response.status_code == 200):
            json = response.json()

            if json["error"] == False:
                #  Get URL of result file
                resultFileUrl = json["url"]
                # Download result file
                r = requests.get(resultFileUrl, stream=True)
                if (r.status_code == 200):
                    with open(destinationFile, 'wb') as file:
                        for chunk in r:
                            file.write(chunk)
                    print(f"Result file saved as \"{destinationFile}\" file.")
                else:
                    print(f"Request error: {response.status_code} {response.reason}")
            else:
                # Show service reported error
                print(json["message"])
        else:
            print(f"Request error: {response.status_code} {response.reason}")

    if __name__ == '__main__':
        main()
    ```
  </Tab>

  <Tab title="C#">
    ```csharp theme={null}
    using Newtonsoft.Json;
    using Newtonsoft.Json.Linq;
    using System;
    using System.Collections.Generic;
    using System.Net;
    using System.Runtime.InteropServices;

    namespace PDFcoApiExample
    {
        class Program
        {
            // The authentication key (API Key).
            // Get your own by registering at https://app.pdf.co
            const String API_KEY = "*************************";

            // Direct URL of source PDF file.
            const string SourceFileUrl = "https://bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf";
            // PDF document password. Leave empty for unprotected documents.
            const string Password = "";
            // File name for generated output. Must be a String
            const string FileName = "f1040-form-filled";

            // Destination File Name
            const string DestinationFile = "./result.pdf";

            static void Main(string[] args)
            {
                // Create standard .NET web client instance
                WebClient webClient = new WebClient();

                // Set API Key
                webClient.Headers.Add("x-api-key", API_KEY);

                // Values to fill out pdf fields with built-in pdf form filler
                var fields = new List<object> {
                    new { fieldName = "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]", pages = "1", text = "True" },
                    new { fieldName = "topmostSubform[0].Page1[0].f1_02[0]", pages = "1", text = "John A." },
                    new { fieldName = "topmostSubform[0].Page1[0].f1_03[0]", pages = "1", text = "Doe" },
                    new { fieldName = "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]", pages = "1", text = "123456789" },
                    new { fieldName = "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]", pages = "1", text = "John  B." },
                    new { fieldName = "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]", pages = "1", text = "Doe" },
                    new { fieldName = "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_07[0]", pages = "1", text = "987654321" }
                };

                // If enabled, Runs processing asynchronously. Returns Use JobId that you may use with /job/check to check state of the processing (possible states: working,
                var async = false;

                // Prepare requests params as JSON
                // See documentation: https://developer.pdf.co
                Dictionary<string, object> parameters = new Dictionary<string, object>();
                parameters.Add("url", SourceFileUrl);
                parameters.Add("name", FileName);
                parameters.Add("password", Password);
                parameters.Add("async", async);
                parameters.Add("fields", fields);

                // Convert dictionary of params to JSON
                string jsonPayload = JsonConvert.SerializeObject(parameters);

                try
                {
                    // URL of "PDF Edit" endpoint
                    string url = "https://api.pdf.co/v1/pdf/edit/add";

                    // Execute POST request with JSON payload
                    string response = webClient.UploadString(url, jsonPayload);

                    // Parse JSON response
                    JObject json = JObject.Parse(response);

                    if (json["error"].ToObject<bool>() == false)
                    {
                        // Get URL of generated PDF file
                        string resultFileUrl = json["url"].ToString();

                        // Download generated PDF file
                        webClient.DownloadFile(resultFileUrl, DestinationFile);

                        Console.WriteLine("Generated PDF file saved as \"{0}\" file.", DestinationFile);
                    }
                    else
                    {
                        Console.WriteLine(json["message"].ToString());
                    }
                }
                catch (WebException e)
                {
                    Console.WriteLine(e.ToString());
                }
                finally
                {
                    webClient.Dispose();
                }

                Console.WriteLine();
                Console.WriteLine("Press any key...");
                Console.ReadKey();
            }
        }
    }
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    package com.company;

    import com.google.gson.JsonObject;
    import com.google.gson.JsonParser;
    import okhttp3.*;

    import java.io.*;
    import java.net.*;
    import java.nio.file.Path;
    import java.nio.file.Paths;

    public class Main
    {
        // The authentication key (API Key).
        // Get your own by registering at https://app.pdf.co
        final static String API_KEY = "****************************";

        // Direct URL of source PDF file.
        final static String SourceFileUrl = "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf";
        // PDF document password. Leave empty for unprotected documents.
        final static String Password = "";

        // Destination PDF file name
        final static Path ResultFile = Paths.get(".\\result.pdf");

        public static void main(String[] args) throws IOException
        {
            // Create HTTP client instance
            OkHttpClient webClient = new OkHttpClient();

            // Prepare URL for `PDF Edit` API call
            String query = "https://api.pdf.co/v1/pdf/edit/add";

            // Prepare form filling data
            String fields = "[\n" +
                    "        {\n" +
                    "            \"fieldName\": \"topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]\",\n" +
                    "            \"pages\": \"1\",\n" +
                    "            \"text\": \"True\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "            \"fieldName\": \"topmostSubform[0].Page1[0].f1_02[0]\",\n" +
                    "            \"pages\": \"1\",\n" +
                    "            \"text\": \"John A.\"\n" +
                    "        },        \n" +
                    "        {\n" +
                    "            \"fieldName\": \"topmostSubform[0].Page1[0].f1_03[0]\",\n" +
                    "            \"pages\": \"1\",\n" +
                    "            \"text\": \"Doe\"\n" +
                    "        },        \n" +
                    "        {\n" +
                    "            \"fieldName\": \"topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]\",\n" +
                    "            \"pages\": \"1\",\n" +
                    "            \"text\": \"123456789\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "            \"fieldName\": \"topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]\",\n" +
                    "            \"pages\": \"1\",\n" +
                    "            \"text\": \"Joan B.\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "            \"fieldName\": \"topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]\",\n" +
                    "            \"pages\": \"1\",\n" +
                    "            \"text\": \"Joan B.\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "            \"fieldName\": \"topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]\",\n" +
                    "            \"pages\": \"1\",\n" +
                    "            \"text\": \"Doe\"\n" +
                    "        },\n" +
                    "        {\n" +
                    "            \"fieldName\": \"topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_07[0]\",\n" +
                    "            \"pages\": \"1\",\n" +
                    "            \"text\": \"987654321\"\n" +
                    "        }     \n" +
                    "    ]";

            // Asynchronous Job
            String async = "false";

            // Make correctly escaped (encoded) URL
            URL url = null;
            try
            {
                url = new URI(null, query, null).toURL();
            }
            catch (URISyntaxException e)
            {
                e.printStackTrace();
            }

            // Create JSON payload
            String jsonPayload = String.format("{\n" +
                    "    \"url\": \"%s\",\n" +
                    "    \"async\": %s,\n" +
                    "    \"encrypt\": false,\n" +
                    "    \"name\": \"f1040-filled\",\n" +
                    "    \"fields\": %s"+
                    "}", SourceFileUrl, async, fields);

            // Prepare request body
            RequestBody body = RequestBody.create(MediaType.parse("application/json"), jsonPayload);
            // Prepare request
            Request request = new Request.Builder()
                    .url(url)
                    .addHeader("x-api-key", API_KEY) // (!) Set API Key
                    .addHeader("Content-Type", "application/json")
                    .post(body)
                    .build();

            // Execute request
            Response response = webClient.newCall(request).execute();

            if (response.code() == 200)
            {
                // Parse JSON response
                JsonObject json = new JsonParser().parse(response.body().string()).getAsJsonObject();

                boolean error = json.get("error").getAsBoolean();
                if (!error)
                {
                    // Get URL of generated output file
                    String resultFileUrl = json.get("url").getAsString();

                    // Download the image file
                    downloadFile(webClient, resultFileUrl, ResultFile);

                    System.out.printf("Generated file saved to \"%s\" file.", ResultFile.toString());
                }
                else
                {
                    // Display service reported error
                    System.out.println(json.get("message").getAsString());
                }
            }
            else
            {
                // Display request error
                System.out.println(response.code() + " " + response.message());
            }
        }

        public static void downloadFile(OkHttpClient webClient, String url, Path destinationFile) throws IOException
        {
            // Prepare request
            Request request = new Request.Builder()
                    .url(url)
                    .build();
            // Execute request
            Response response = webClient.newCall(request).execute();

            byte[] fileBytes = response.body().bytes();

            // Save downloaded bytes to file
            OutputStream output = new FileOutputStream(destinationFile.toFile());
            output.write(fileBytes);
            output.flush();
            output.close();

            response.close();
        }
    }
    ```
  </Tab>

  <Tab title="PHP">
    ```php theme={null}
    <?php

      // Get submitted form data
      $apiKey = $_POST["apiKey"]; // The authentication key (API Key). Get your own by registering at https://app.pdf.co

      // Prepare URL for Fill PDF API call
      $url = "https://api.pdf.co/v1/pdf/edit/add";

      // Prepare requests params
      // See documentation: https://developer.pdf.co
      $parameters = array();

      // Direct URL of source PDF file.
      $parameters["url"] = "bytescout-com.s3-us-west-2.amazonaws.com/files/demo-files/cloud-api/pdf-form/f1040.pdf";

      // Name of resulting file
      $parameters["name"] = "f1040-form-filled";

      // If large input document, process in async mode by passing true
      $parameters["async"] = false;

      // Field Strings
      $fields =   '[{
          "fieldName": "topmostSubform[0].Page1[0].FilingStatus[0].c1_01[1]",
          "pages": "1",
          "text": "True"
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].f1_02[0]",
          "pages": "1",
          "text": "John A."
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].f1_03[0]",
          "pages": "1",
          "text": "Doe"
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_04[0]",
          "pages": "1",
          "text": "123456789"
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
          "pages": "1",
          "text": "Joan B."
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_05[0]",
          "pages": "1",
          "text": "Joan B."
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_06[0]",
          "pages": "1",
          "text": "Doe"
      },
      {
          "fieldName": "topmostSubform[0].Page1[0].YourSocial_ReadOrderControl[0].f1_07[0]",
          "pages": "1",
          "text": "987654321"
      }]';// JSON string

      // Convert JSON string to Array
      $fieldsArray = json_decode($fields, true);

      $parameters["fields"] = $fieldsArray;

      // Create Json payload
      $data = json_encode($parameters);

      // Create request
      $curl = curl_init();
      curl_setopt($curl, CURLOPT_HTTPHEADER, array("x-api-key: " . $apiKey, "Content-type: application/json"));
      curl_setopt($curl, CURLOPT_URL, $url);
      curl_setopt($curl, CURLOPT_POST, true);
      curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
      curl_setopt($curl, CURLOPT_POSTFIELDS, $data);

      // Execute request
      $result = curl_exec($curl);

      if (curl_errno($curl) == 0)
      {
          $status_code = curl_getinfo($curl, CURLINFO_HTTP_CODE);

          if ($status_code == 200)
          {
              $json = json_decode($result, true);

              if (!isset($json["error"]) || $json["error"] == false)
              {
                  $resultFileUrl = $json["url"];

                  // Display link to the file with conversion results
                  echo "<div><h2>Result:</h2><a href='" . $resultFileUrl . "' target='_blank'>" . $resultFileUrl . "</a></div>";
              }
              else
              {
                  // Display service reported error
                  echo "<p>Error: " . $json["message"] . "</p>";
              }
          }
          else
          {
              // Display request error
              echo "<p>Status code: " . $status_code . "</p>";
              echo "<p>" . $result . "</p>";
          }
      }
      else
      {
          // Display CURL error
          echo "Error: " . curl_error($curl);
      }

      // Cleanup
      curl_close($curl);

    ?>
    ```
  </Tab>
</Tabs>
