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

# Add Text/Images to PDF

> Add text, images, and annotations to your PDF documents with precise positioning and styling options.

<img src="https://mintcdn.com/pdfco/tXGo3rbTS_pEF5es/images/integrations/n8n/add-text-image-to-pdf.png?fit=max&auto=format&n=tXGo3rbTS_pEF5es&q=85&s=e4f2dbc05a72f05027c8f3c5c851be52" alt="Add Text Image To Pdf Pn" width="888" height="1282" data-path="images/integrations/n8n/add-text-image-to-pdf.png" />

## Input

<Tip>
  The n8n node doesn't expose every PDF.co API parameter as a field. To pass a parameter that isn't shown, use the **Custom Profiles** field with `std_params`. See [Standard Parameters](/api/profiles#standard-parameters).
</Tip>

| Name | Description | Required |
| :- | :- | :- |
| **PDF URL** | Provide the URL to the source PDF document, or a `filetoken://` link from [PDF.co Built-In Files Storage](https://app.pdf.co/tools/files). If you use another cloud service such as **Google Drive** or **Dropbox** ensure the link is publicly accessible. | Yes |
| **Text** | Enter the text for the text object. Macros like line breaks (`\\n` or `{{$$newLine}}`) or page numbers (`{{$$PageNumber}}`) can be inserted. For using special macros on **n8n**, see [Macros for Text](/knowledgebase/macros-for-text#special-macro-style%3A-square-brackets). | Yes |
| **Image URL** | URL to image, base64 encoded image, or `filetoken://` link to image stored in [PDF.co Files storage](https://app.pdf.co/tools/files). | Yes |
| **X Coordinate** | Determine the X coordinate for text placement. Use **PDF.co** [**PDF Inspector**](https://app.pdf.co/pdf-inspector) to find or measure **PDF** **coordinates**. | Yes |
| **Y Coordinate** | Specify the Y coordinate. Use [****PDF.co PDF Inspector****](https://app.pdf.co/pdf-inspector) to find or measure **PDF coordinates**. | Yes |
| **Font Size** | Set the font size, with the default being `12`. | No |
| **Font Color** | Choose the text color in hex format (`#RRGGBB` or `#AARRGGBB`, with `AA` as transparency). The default is `#000000`. | No |
| **Font Bold** | Enable this to apply bold styling to the font. | No |
| **Font Italic** | Enable this to apply italic styling to the font. | No |
| **Font Strikeout** | Enable this to apply strikeout styling to the font. | No |
| **Font Underline** | Enable this to apply underline styling to the font. | No |
| **Font Name** | Select the font name from the [**available font list**](https://developer.pdf.co/knowledgebase/general). The default font is **Arial**. | No |
| **Pages** | Indicate specific page numbers or ranges where the text should be added. Leave blank to include all pages. The first page is numbered `0`. Example: `0,2-5,7-`. | No |
| **Link** | Add an optional clickable link (starting with `http://`, `https://`, `mailto:name@example.com`, etc.). | No |
| **Width** | Define the width of the text box. Coordinates start at the top left (use the [**PDF.co PDF Inspector**](https://app.pdf.co/pdf-inspector) to measure coordinates). | No |
| **Height** | Define the height of the text box. Coordinates start at the top left (use the [**PDF.co PDF Inspector**](https://app.pdf.co/pdf-inspector) to measure coordinates). | No |
| **Alignment** | Set text alignment as `Center`, `Right`, or `Left`. Default is `Center`. | No |
| **Transparent** | Set the text background as transparent. | No |
| **Keep Aspect Ratio** | Keep the aspect ratio of the image. | No |
| **File Name** | File name for the generated output, the input must be in string format. | No |
| **Webhook URL** | The callback URL or Webhook used to receive the output data. | No |
| **HTTP Username** | HTTP auth user name if required to access source URL. | No |
| **HTTP Password** | HTTP auth password if required to access source URL. | No |
| **Custom Profiles** | Use JSON to customize PDF processing with options like output resolution, OCR settings, text extraction methods, encryption, and image handling. Check our [Custom Profile](#custom-profiles) section to see all available parameters for your current endpoint. | No |

## Custom Profiles

You can set additional options for the operation used in the PDF.co node by using **Custom Profiles**. A custom profile is a string in **JSON-like format** containing predefined parameters.

Here’s an example of a Custom Profiles input:

```
{ "outputDataFormat": "base64" }
```

With this input, the PDF.co operation will return the output in `base64` format. You can find the list of available parameters for customizing profiles in the PDF.co operation documentation below:

<Tip>
  You can use any regular API parameter from the [API Reference](/api)within n8n using the `std_params` feature in profiles. The `std_params` enables the definition of regular API parameters in a JSON format, See [Standard Parameters](/api/profiles#standard-parameters) for detailed documentation and examples.
</Tip>

| Parameter | Type | Default | Description |
| :- | :- | :- | :- |
| `outputDataFormat` | string | - | If you require your output as `base64` format, set this to `base64` |
| `Pages[0].SetCropBox()` | array\[string] | - | 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 | `false` | To disable ligaturization, for example for Hebrew. |
| `FlattenDocument()` | boolean | `false` | Flattening a document renders it as read-only. Handy if you want to remove editing or copying capability. |
| `DataEncryptionAlgorithm` | string | - | Controls the encryption algorithm used for data encryption. See [**User-Controlled Encryption**](https://developer.pdf.co/knowledgebase/user-controlled-encryption) for more information. The available algorithms are: `AES128`, `AES192`, `AES256`. |
| `DataEncryptionKey` | string | - | Controls the encryption key used for data encryption. See [**User-Controlled Encryption**](https://developer.pdf.co/knowledgebase/user-controlled-encryption) for more information. |
| `DataEncryptionIV` | string | - | Controls the encryption IV used for data encryption. See [**User-Controlled Encryption**](https://developer.pdf.co/knowledgebase/user-controlled-encryption) for more information. |
| `DataDecryptionAlgorithm` | string | - | Controls the decryption algorithm used for data decryption. See [**User-Controlled Encryption**](https://developer.pdf.co/knowledgebase/user-controlled-encryption) for more information. The available algorithms are: `AES128`, `AES192`, `AES256`. |
| `DataDecryptionKey` | string | - | Controls the decryption key used for data decryption. See [**User-Controlled Encryption**](https://developer.pdf.co/knowledgebase/user-controlled-encryption) for more information. |
| `DataDecryptionIV` | string | - | Controls the decryption IV used for data decryption. See [**User-Controlled Encryption**](https://developer.pdf.co/knowledgebase/user-controlled-encryption) for more information. |

You can also use `Custom Profiles` to:

* [Crop a PDF File](https://developer.pdf.co/api/pdf-add#crop-a-pdf-file)
* [Disable Ligaturization](https://developer.pdf.co/api/pdf-add#disable-ligaturization)
* [Flatten Document](https://developer.pdf.co/api/pdf-add/fill-pdf-forms#flatten-document)
* Visit this page for [general information on Profiles usage.](https://developer.pdf.co/api/profiles)

## Output

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


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.