The Workflow
- Run Edit once without a form_schema to let Reducto detect all fields
- Save the returned
form_schemafrom the response, and setvaluetonullon fields the LLM must fill (see Check Which Fields Were Filled) - Use that schema for subsequent fills of the same form type
Schema Structure
A form schema is an array of field definitions:Field Properties
Bounding Box
Coordinates are normalized (0-1), measured from the top-left corner:Page numbers are 1-indexed. The first page is
page: 1.Fill Control
Thefill and value properties control how each field is handled:
Use
value for fields that should always contain the same thing (form version, tax year). Use fill: false for fields that should stay blank (signature boxes).
For a checkbox, value: "true" checks the box and value: "false" leaves it unchecked.
Check Which Fields Were Filled
In the response, each field inform_schema shows the result of the fill. value is the value Edit wrote to the field, or null if it wrote nothing. filled is true if Edit wrote a value to the field and false if it left the field empty.
For a checkbox, filled: true means that Edit set the checkbox state. Read value to see if the box is checked. "true" (in any letter case) means checked. "false" or null means unchecked.
If Edit fills no fields, the response warnings array contains a message:
warnings is null when there is nothing to report. Before you send the document to a user, check that filled is true for each required field.
Widget Types
Text
Standard text input fields. The LLM extracts the relevant value from your instructions based on the field’s description.Checkbox
Boolean fields that get checked or unchecked. The LLM interprets your instructions to determine whether the box should be checked.Dropdown
Selection fields with predefined options. The LLM suggests a value, and Edit selects the matching option from the PDF’s dropdown.Barcode
Special fields for barcode data. These are typically detected automatically in forms that have barcode regions and filled with encoded data.Troubleshooting
Text appears in wrong location
Text appears in wrong location
Coordinates are from the top-left (0,0), with Y increasing downward. If you measured from bottom-left, flip the Y values:
correct_top = 1 - your_top - heightStart with a single field, verify it works, then add more incrementally.Schema doesn't match existing PDF widgets
Schema doesn't match existing PDF widgets
Edit matches schema fields to existing widgets using bounding box overlap. If overlap is less than 50%, a new widget is created.Run Edit without a schema first to see actual widget positions, then adjust your coordinates to match.
Checkbox not checking
Checkbox not checking
- Ensure
typeis"checkbox", not"text" - Bounding boxes should be small and square
- Be explicit in instructions: “Check the ‘Yes’ checkbox for US citizenship”
Fields skipped silently
Fields skipped silently
Fields with
filled: false in the response were not filled. Check for:fill: falseon the field- Dropdown value not matching available options exactly
- Instructions don’t mention data for this field
- Unsupported widget types (signatures, images)