# Fields - QRCodes

### Adding a dynamic QRCode to document template

You can add dynamic QR codes to your templates using the `>` prefix.\
Examples: `{>companyLink}`, `{>paymentLink}`.

<figure><img src="https://1713720388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIRMYKAUZ0NsaDRvNONC3%2Fuploads%2FRT8ZUg3HCuVC66KTsSGC%2Fimage.png?alt=media&#x26;token=7bd840ba-5c4f-4f18-81b3-bcda8ea936c5" alt="" width="337"><figcaption><p>Template that contains QRCode fields</p></figcaption></figure>

<figure><img src="https://1713720388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIRMYKAUZ0NsaDRvNONC3%2Fuploads%2FOeIiSjmbgt1oL8zvmCcy%2Fimage.png?alt=media&#x26;token=f1a2fdd5-af27-4c50-afc5-7e58a8ec4679" alt="" width="375"><figcaption><p>Output document with generated QRCodes based on passed data</p></figcaption></figure>

### QRCodes data limits

QR codes are limited to 1,000 characters and 50 lines. If you exceed either of these limits, the QR code will not appear in the output document.

### QRCode Size

By default, the size of the QR code is determined by the amount of data it contains (more data results in a larger QR code). You can manually set the width and height, or limit the maximum width or height to preserve the aspect ratio using the `"size"` and `"maxSize"` formatters. We recommend not changing the size of the QR code to ensure readability. If needed, use `"maxSize"` to constrain dimensions while maintaining quality.

Examples:

```
{>qrcode}
{>qrcode2 | maxSize:300:500}
```

### How to pass data for QRCode

Once you upload your document template containing a QRCode tag (e.g., `{>link}`), a corresponding text field will be added to the template form. Users can enter a value into this field, and it will be rendered as a QR code in the generated document.

**How to pass QRCode data using Forms**

By default, QR code fields are displayed as multiline text fields where you can enter the content to be included in the QR code. You can customize them just like any other text field.

<figure><img src="https://1713720388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIRMYKAUZ0NsaDRvNONC3%2Fuploads%2FJ6YzI5dXhFnanjEPwMpA%2Fimage.png?alt=media&#x26;token=99abca64-c4a0-4c98-b360-dbad9c41d9b2" alt=""><figcaption></figcaption></figure>

**How to pass the QRCode data using API**

You can provide data for the QR code through the API. To include multiline text, use the newline character `"\n"`.

<figure><img src="https://1713720388-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FIRMYKAUZ0NsaDRvNONC3%2Fuploads%2FZz7Rlf7B2wJah9eqX4zC%2Fimage.png?alt=media&#x26;token=452e2acd-7420-42fa-a19f-2a32ff5cf1aa" alt=""><figcaption></figcaption></figure>
