Overview
There are three methods to create a PandaDoc document via API. Here is a quick overview:
From PandaDoc Template | From Public URL | From File Upload | |
---|---|---|---|
Primary Use | Manage editable templates in PandaDoc | Manage templates elsewhere, such as Microsoft Word, Adobe Acrobat, or PDF files generated from a custom application. | Manage templates elsewhere, such as Microsoft Word, Adobe Acrobat, or PDF files generated from a custom application. |
Source: | PandaDoc Template | File Example: PDF file as a template uploaded with the API request | File Example: PDF file as a template uploaded with the API request |
Supports Fields | Yes | Yes | Yes |
Supports Variables (ex. Tokens) | Yes | No | No |
Supports Content Placeholders (Smart Content) | Yes | No | No |
Supports Tables | Yes | No | No |
Supports Pricing Tables | Yes | No | No |
Supports Images | Yes | No | No |
Editable in PandaDoc | Yes | Partial* | Partial* |
*Fields can be arranged but content cannot be edited.
Form Fields
PandaDoc recognizes PDF form fields. To enable this feature, pass the optional parse_form_fields
value as true
when making a create document API call. We support Text fields, Dropdowns, and Signature fields.
If you would like to pass additional parameters to configure PDF form fields, use the PDF field name as an optId
. You can use a PDF editor such as Adobe Acrobat, Foxit to get and edit field names in your PDF.
Download a Sample PDF with Form Fields
Field Tags
This parsing format allows a word processor such as Microsoft Word or Google Docs to prepare a document and save it in PDF, DocX or RTF format.
Within the text, PandaDoc parses field tags. A field tag starts and ends with brackets. The field tag includes basic information on how to create a form field in the PandaDoc document. The request JSON object optId
can also extend this information for even greater control.
Here is an example of how the field tag in a PDF/DocX/RTF is converted to a text field in the PandaDoc document:
Download a Sample PDF with Field Tags
PDF field tag key
You can only use the ":" (colon) symbol between variables. This symbol cannot be trailing.
Number | Key | Description | Example |
---|---|---|---|
1 | fieldType | Field type from the table documented below. | signature , or s for shorthand |
2 | * | Optional * denotes the field is not required. | * |
3 | role | Role name. Associate the field tag with a recipient role. Roles must be assigned to recipients in the request body. In this case we are using role s1 to keep the length short and denote the concept of "signer 1". s1 would be the value passed as role in a recipient JSON object. | s1 |
4 | optId | Optional field Id. Specify more information about the field tag within the post request by using this id. | sigBox17 |
5 | _____ | Use underscores to widen the field if desired. The form fields in PandaDoc will scale to the length and size of your field tag. | _____ |
Role names restrictions
Underscores are not supported in role names for a file with a Field Tag.
PDF/DocX/RTF field tag supported types
Field Type | Short Notation | Is PandaDoc Field |
---|---|---|
textfield | t | Field |
checkbox | c | Field |
signature | s | Field |
date | d | Field |
initials | i | Field |
dropdown | dd | Field |
radio | r | Field |
Radio buttons limitations
- Radio button options within the same block must be on the same page.
- Preselection of options is not supported.
- Different blocks require unique IDs.
- Values for radio button options must be unique.
- Each document can have a minimum of two and a maximum of 50 radio button options.
Fields in PandaDoc
The following article explains how to use Fields: Everything you need to know about Fields
"fields": {
"textfield": {
"value": "Jane",
"role": "user"
},
"dropdown": {
"value": "opt1",
"role": "user",
"options": [
"opt1",
"opt2",
"opt3"
]
},
"checkbox": {
"value": true,
"role": "user"
},
"date": {
"value": "2022-05-20",
"role": "user"
},
"initials": {
"value": "",
"role": "user"
},
"signature": {
"value": "",
"role": "user"
}
}
Updated about 14 hours ago