PDF Template Mapper
AI-generatedSummary
Injects text and checkboxes into a PDF using AI to locate field positions.
Inputs
- mode (required) — Filling strategy: 'ia' (AI analyzes PDF labels, recommended), 'smart' (detects zones + LLM matching, 1-2 calls), or 'agent' (ReAct loop with verification, slower).
- pdfProperty (required) — Name of the binary field containing the source PDF.
- pageNumber (required) — Target page number to fill (defaults to 2).
- fillData (required) — JSON object with keys matching PDF labels. Boolean values are mapped to checkboxes. Can be a flat object (keys are field names) or structured with 'fields', 'checkboxes', and/or 'tables'.
- sectionMarker — Optional text hint to help the LLM focus on a specific form section.
- outputFilename — Custom filename for the generated PDF.
- fontSize — Font size in points for inserted text.
- debug — Enable detailed console logs.
- maxIterations — Maximum iterations for the Agent mode loop.
- pagesToSearch — Comma-separated page numbers for Agent mode to prioritize.
- agentContext — Free text context to guide the Agent (e.g., 'DC1 public markets form').
Output shape
A single item containing the filled PDF as a binary attachment and JSON metadata.
Metadata includes success status, mode, stats (duration, fields placed, iterations), and error logs.
Examples
Example 1: Fill a contract PDF with company details using the recommended IA mode.
Mode: IA First; Page: 1; fillData: { 'Company Name': 'Acme Corp', 'Date': '2023-10-27', 'Signed': true }
Example 2: Fill a multi-page form using the Smart mode to detect zones and map fields.
Mode: Smart; Page: 2; fillData: { 'Client Name': 'John Doe', 'Address': '123 Main St' }
Example 3: Fill a complex form with the Agent mode for iterative verification.
Mode: Agent; Page: 1; fillData: { 'Field A': 'Value A', 'Field B': 'Value B' }; Max Iterations: 10