> For the complete documentation index, see [llms.txt](https://support.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://support.docstudio.com/user/template-builder/template-editor/how-to-add-pdf-documents-in-a-template.md).

# How to Add PDF Documents in a Template

This document explains how to add a PDF document to a template, configure its properties, and import embedded PDF fields.

{% columns %}
{% column %}
A PDF document is a file added to your template.

It can be:

* Uploaded directly to the template.
* Left empty for an envelope participant to upload later (depending on their assigned role).

Use a **PDF document** when the file must stay in PDF format.

Use an **External document** when users must upload non-PDF files or when you need broader file type support.
{% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FVKxUKPC104LYuncKYJz0%2Fimage.png?alt=media&amp;token=b4345e6b-9286-4c67-9c0c-783878be35a6" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Limits

{% hint style="info" %}
By default, an envelope can contain up to **50** PDF and external documents in total. Your system admin can change this limit.
{% endhint %}

### Add a PDF document to a template

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

1. Open the **Documents** panel.
2. Click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2F1tf9RatveODqLFQAdPgp%2Fimage.png?alt=media&amp;token=74ffb638-08ac-4563-822f-718b09e8a4a9" alt="" data-size="line"> button.
3. Click **PDF document**.
4. In the file picker, select a PDF to upload.
5. Or close the file picker to keep the document empty.

If you upload a PDF, DocStudio adds it to the template immediately. If you close the file picker, the PDF document stays empty for later upload.
{% endcolumn %}

{% column width="50%" %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FwJfudRWFmX29LaapwaLO%2Fimage.png?alt=media&amp;token=6088de51-0092-43ae-93c0-d8cd47e4cb1a" alt="" width="170"><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

{% hint style="info" %}
If the PDF document is empty, it can be uploaded later by envelope participants. By default, the document is assigned to **Sender**.
{% endhint %}

### Configure PDF document properties

You can edit properties only when no PDF is uploaded yet.

Available properties are more limited than for an external document.

You can configure:

* role
* optionality

You can also add signature fields to the PDF document after you add it to the template.

### Import PDF fields

Import embedded PDF fields from the uploaded PDF to convert supported fields to DocStudio fields.

Conversion map:

* text → text field
* date → text field
* checkbox → checkbox field
* radio button → choice field
* dropdown menu → dropdown field
* listbox → dropdown field
* signature → PAdES field (only if enabled by a system administrator)
* picture → not supported (ignored)
* barcode → not supported (ignored)

All imported fields, except for dropdown-based fields, inherit the optional or mandatory attributes from the original PDF.

### Upload options for encrypted or filled PDFs

Depending on PDF content and encryption, you may see different upload options. Only applicable options are shown for each file.

1. Preserve encryption. Existing fields are converted, but you can add only new electronic signature fields.
2. Save existing data and signatures. You can add only new electronic signature fields.
3. Convert all fields without preserving encryption. All fields can be converted, new fields can be added, and DocStudio may create a new role for each signature.
4. Save the document “as is”. Existing fields stay disabled and are not converted, but you can add new fields.
5. Remove all existing fields and signatures. Existing fields are removed and you can add any new fields.

### Duplicate a PDF document

1. In the document header, click the **Context menu** ![](https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FyHfKoPIaxXDm4IhhPtTo%2Fimage.png?alt=media\&token=f2f94a51-9336-4c11-a5b5-f41614713e91) icon.
2. Click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2F4pgMTS02b8L969I8OCeD%2Fimage.png?alt=media&amp;token=6643a4c3-c24c-445f-8ba0-fb746a7426ab" alt="" data-size="line"> icon.

DocStudio creates a copy of the PDF document slot with the same settings.

### Delete a PDF document

1. In the document header, click the **Context menu** ![](https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FyHfKoPIaxXDm4IhhPtTo%2Fimage.png?alt=media\&token=f2f94a51-9336-4c11-a5b5-f41614713e91) icon.
2. Click the <img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2F3fLtE5nfm7A91HA4nxTh%2Fimage.png?alt=media&amp;token=ae2efecc-21c0-49c2-a2b9-8ce1a2d6748c" alt="" data-size="line"> icon.

{% hint style="warning" %}
Deleting the PDF document removes it and its configuration from the template.
{% endhint %}

{% columns %}
{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2FPmy20hhQzNvtTdKU6ahM%2Fimage.png?alt=media&amp;token=6f059aaa-b5b8-43f5-962a-2eb996f19f5e" alt=""><figcaption></figcaption></figure>
{% endcolumn %}

{% column %}

<figure><img src="https://2962383972-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FoqUiFHjwtCCGSaEDqbXb%2Fuploads%2F9GzG8LeJQF6twLVvZOUX%2Fimage.png?alt=media&amp;token=7f94d574-41a9-4287-99e9-fde075e5e1f8" alt=""><figcaption></figcaption></figure>
{% endcolumn %}
{% endcolumns %}

### Related topics

* [How to Add External Documents to a Template](https://support.docstudio.com/user/template-builder/template-editor/how-to-add-external-documents-to-a-template.md)
* [How to Create a Structured Template](https://support.docstudio.com/user/template-builder/template-editor/how-to-create-a-structured-template.md)
* [External Documents in the Envelope](https://support.docstudio.com/user/external-documents-in-the-envelope.md).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://support.docstudio.com/user/template-builder/template-editor/how-to-add-pdf-documents-in-a-template.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
