fill_forms
Fill PDF form fields with specific values using field names and page numbers. Works with online PDFs or uploaded files, ensuring accurate data entry and form completion.
Instructions
Fill existing form fields in a PDF document.
Example fields format:
[
{
"fieldName": "field_name_from_form_info",
"pages": "1",
"text": "Value to fill"
}
]
Use 'read_pdf_forms_info' first to get the fieldName values of the form.
Ref: https://developer.pdf.co/api-reference/pdf-add#create-fillable-pdf-forms.md
Input Schema
Name | Required | Description | Default |
---|---|---|---|
api_key | No | PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional) | |
fields | Yes | List of fields to fill. Each field is a dict with 'fieldName', 'pages', and 'text' properties. | |
httppassword | No | HTTP auth password if required to access source url. (Optional) | |
httpusername | No | HTTP auth user name if required to access source url. (Optional) | |
name | No | File name for the generated output. (Optional) | |
url | Yes | URL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files. |
Input Schema (JSON Schema)
{
"properties": {
"api_key": {
"default": "",
"description": "PDF.co API key. If not provided, will use X_API_KEY environment variable. (Optional)",
"title": "Api Key",
"type": "string"
},
"fields": {
"description": "List of fields to fill. Each field is a dict with 'fieldName', 'pages', and 'text' properties.",
"items": {},
"title": "Fields",
"type": "array"
},
"httppassword": {
"default": "",
"description": "HTTP auth password if required to access source url. (Optional)",
"title": "Httppassword",
"type": "string"
},
"httpusername": {
"default": "",
"description": "HTTP auth user name if required to access source url. (Optional)",
"title": "Httpusername",
"type": "string"
},
"name": {
"default": "",
"description": "File name for the generated output. (Optional)",
"title": "Name",
"type": "string"
},
"url": {
"description": "URL to the source PDF file. Supports publicly accessible links including Google Drive, Dropbox, PDF.co Built-In Files Storage. Use 'upload_file' tool to upload local files.",
"title": "Url",
"type": "string"
}
},
"required": [
"url",
"fields"
],
"type": "object"
}