PDF Skill
Required Environment Variables
Invocation Contract
- Call
run_skill_script with:
skill_name: pdf
script_name: one of check_fillable_fields, extract_form_field_info, fill_fillable_fields, convert_pdf_to_images, check_bounding_boxes, create_validation_image, fill_pdf_form_with_annotations
- These scripts are positional-argument based. Use
args, not kwargs, for required parameters.
Scripts API
script_name: check_fillable_fields
args: ["<input_pdf>"]
- Output: prints whether the PDF has fillable fields.
script_name: extract_form_field_info
args: ["<input_pdf>", "<output_json>"]
- Output: JSON file with discovered fields and metadata.
script_name: fill_fillable_fields
args: ["<input_pdf>", "<field_values_json>", "<output_pdf>"]
- Input contract: field values JSON structure documented in
forms.md.
script_name: convert_pdf_to_images
args: ["<input_pdf>", "<output_directory>"]
- Output: PNG images (one per page).
script_name: check_bounding_boxes
args: ["<fields_json>"]
- Input contract:
fields.json format documented in forms.md.
- Output: validation messages.
script_name: create_validation_image
args: ["<page_number>", "<fields_json>", "<input_image>", "<output_image>"]
- Output: image with overlay boxes for inspection.
script_name: fill_pdf_form_with_annotations
args: ["<input_pdf>", "<fields_json>", "<output_pdf>"]
- Input contract: annotated form JSON schema in
forms.md.
run_skill_script Examples
{
"skill_name": "pdf",
"script_name": "extract_form_field_info",
"args": ["form.pdf", "fields.json"]
}
{
"skill_name": "pdf",
"script_name": "fill_fillable_fields",
"args": ["form.pdf", "field_values.json", "filled.pdf"]
}
Direct CLI Examples
python agent_skills/skills/pdf/scripts/check_fillable_fields.py form.pdf
python agent_skills/skills/pdf/scripts/extract_form_field_info.py form.pdf fields.json
python agent_skills/skills/pdf/scripts/fill_fillable_fields.py form.pdf field_values.json filled.pdf
python agent_skills/skills/pdf/scripts/convert_pdf_to_images.py form.pdf out_images/
python agent_skills/skills/pdf/scripts/check_bounding_boxes.py fields.json
python agent_skills/skills/pdf/scripts/create_validation_image.py 1 fields.json out_images/page_1.png validated.png
python agent_skills/skills/pdf/scripts/fill_pdf_form_with_annotations.py form.pdf fields.json annotated.pdf
References
forms.md: required JSON structures for form workflows.
reference.md: additional PDF workflow guidance.
1---2name: pdf3description: PDF form-processing toolkit for checking fillable forms, extracting form field metadata, validating bounding boxes, converting pages to images, and filling forms.4license: Proprietary. LICENSE.txt has complete terms5---67# PDF Skill89## Required Environment Variables1011- None required.1213## Invocation Contract1415- Call `run_skill_script` with:16 - `skill_name`: `pdf`17 - `script_name`: one of `check_fillable_fields`, `extract_form_field_info`, `fill_fillable_fields`, `convert_pdf_to_images`, `check_bounding_boxes`, `create_validation_image`, `fill_pdf_form_with_annotations`18- These scripts are positional-argument based. Use `args`, not `kwargs`, for required parameters.1920## Scripts API2122### `script_name: check_fillable_fields`2324- `args`: `["<input_pdf>"]`25- Output: prints whether the PDF has fillable fields.2627### `script_name: extract_form_field_info`2829- `args`: `["<input_pdf>", "<output_json>"]`30- Output: JSON file with discovered fields and metadata.3132### `script_name: fill_fillable_fields`3334- `args`: `["<input_pdf>", "<field_values_json>", "<output_pdf>"]`35- Input contract: field values JSON structure documented in `forms.md`.3637### `script_name: convert_pdf_to_images`3839- `args`: `["<input_pdf>", "<output_directory>"]`40- Output: PNG images (one per page).4142### `script_name: check_bounding_boxes`4344- `args`: `["<fields_json>"]`45- Input contract: `fields.json` format documented in `forms.md`.46- Output: validation messages.4748### `script_name: create_validation_image`4950- `args`: `["<page_number>", "<fields_json>", "<input_image>", "<output_image>"]`51- Output: image with overlay boxes for inspection.5253### `script_name: fill_pdf_form_with_annotations`5455- `args`: `["<input_pdf>", "<fields_json>", "<output_pdf>"]`56- Input contract: annotated form JSON schema in `forms.md`.5758## `run_skill_script` Examples5960- Extract field info:6162```json63{64 "skill_name": "pdf",65 "script_name": "extract_form_field_info",66 "args": ["form.pdf", "fields.json"]67}68```6970- Fill fillable fields:7172```json73{74 "skill_name": "pdf",75 "script_name": "fill_fillable_fields",76 "args": ["form.pdf", "field_values.json", "filled.pdf"]77}78```7980## Direct CLI Examples8182```bash83python agent_skills/skills/pdf/scripts/check_fillable_fields.py form.pdf84python agent_skills/skills/pdf/scripts/extract_form_field_info.py form.pdf fields.json85python agent_skills/skills/pdf/scripts/fill_fillable_fields.py form.pdf field_values.json filled.pdf86python agent_skills/skills/pdf/scripts/convert_pdf_to_images.py form.pdf out_images/87python agent_skills/skills/pdf/scripts/check_bounding_boxes.py fields.json88python agent_skills/skills/pdf/scripts/create_validation_image.py 1 fields.json out_images/page_1.png validated.png89python agent_skills/skills/pdf/scripts/fill_pdf_form_with_annotations.py form.pdf fields.json annotated.pdf90```9192## References9394- `forms.md`: required JSON structures for form workflows.95- `reference.md`: additional PDF workflow guidance.