# QR/barcode Field

Use **QR/barcode field** to generate QR codes and barcodes.

You can place this field in:

* structured documents
* PDF documents

### Add a QR/barcode field

<figure><img src="/files/E58YfdMNSbA2YHqjQOHj" alt=""><figcaption></figcaption></figure>

1. Open the template in edit mode.
2. In the **Fields** panel find the **QR/barcode field** and add it to the template.
3. Configure the field and click **Save**.

### Field settings

Click on the placed field to reopen settings menu.

{% columns %}
{% column width="58.333333333333336%" %}

* **Name** — field name shown in the document
* **Role name** — role that fills the field (only for manual content)
* **Placeholder** — hint text shown before input
* **Tooltip** — additional hint shown on hover
* **Code type** — QR/barcode type
* **Code content** — what is encoded in the code
* **Width** — code width (default value depends on **Code type**)
* **Width units** — millimetres or percentage of document width
* **Optional** — whether filling the field is required (available for manual content)
  {% endcolumn %}

{% column width="41.666666666666664%" %}

<figure><img src="/files/L3Gwe89ARxekPH0taaWG" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% hint style="warning" %}
Most 1D barcodes support a limited set of characters.

Because of this, **Envelope URL** code content may be unavailable for 1D types.
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://support.docstudio.com/user/template-builder/template-dynamic-fields/qr-barcode-field.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
