> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.carbone.io/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Insert a watermark dynamically


# Insert a watermark dynamically

It exists 2 solutions:
- Insert a watermark as a Carbone tag on your template. It is possible to change the color, orientation, and opacity of the watermark. (e.g. [Example 1 with Libre Office](#2-example-1-with-libre-office), [Example 2 with MS Word](#2-example-2-with-ms-word))
- Insert a watermark as a PDF rendering option when requesting Carbone Render API. The watermark will be green, it is not possible to change the color, orientation, and opacity. (e.g. [Example 3](#2-example-3-pdf-rendering-option))

## Example 1 with Libre office

The goal is to insert a watermark as a Carbone tag on the template.
On Libre Office, 
1. From the menu, click `Format` > `Watermark`.
2. Insert the Carbone tag on the `text` field.
3. Then, customize the watermark by setting the font, angle, size, colors, and transparency.

![Watermark options on Libreoffice](https://storage.crisp.chat/users/helpdesk/website/f355e91d7615e000/screenshot-2021-07-20-at-10560_1ko4az8.png)

During rendering, if the JSON dataset has the property `watermark` , such as `{ "watermark": "carbone.io" }`, it will print the watermark with the `carbone.io` value. If the attribute `watermark` is not included on the JSON dataset, it will print nothing.

## Example 2 with MS Word

The goal is to insert a watermark as a Carbone tag on the template.

1. On the Design tab, select Watermark.
2. In the Insert Watermark dialog, select `Text` and type a Carbone tag, such as `{d.watermark}`.
3. Then, customize the watermark by setting the font, layout, size, colors, and orientation.

![Watermark options on MS Word](https://storage.crisp.chat/users/helpdesk/website/f355e91d7615e000/screenshot-2021-07-26-at-18452_35q230.png)

During rendering, if the JSON dataset has the property `watermark` , such as `{ "watermark": "carbone.io" }`, it will print the watermark with the `carbone.io` value. If the attribute `watermark` is not included on the JSON dataset, it will print nothing.

## Example 3 PDF Rendering option

**This example is available only for Carbone Render API or Carbone On-premise.**

When PDF are generated (POST /render/:templateID), [rendering options](https://carbone.io/documentation/developer/http-api/generate-reports.html#pdf-options) can be passed to the request to create a watermark.
The body request should include a `convertTo` object with a child attribute `formatName` set to `pdf` and `formatOptions` with options:
```
{
  convertTo : {
    formatName    : 'pdf',
    formatOptions: {
      Watermark : 'carbone.io'
    }
  }
}
```
It will create a green watermark, such as:
![](https://storage.crisp.chat/users/helpdesk/website/f355e91d7615e000/screenshot-2021-07-26-at-18501_1powd97.png)

More PDF rendering options are available, [click to learn more](https://carbone.io/api-reference.html#pdf-export-filter-options).