What can you do with it?
Fill PDF forms with text fields, checkboxes, and dropdowns using robust fallback strategies. Handles complex PDF structures where field names don’t match visible labels, with multiple methods for reliable form completion.How to use it?
Basic Command Structure
Parameters
- pdf file: URL of the PDF form to fill or PDF content to upload
- form data: Object containing field names and values to fill
- field mapping (optional): Custom mapping between data keys and PDF field names
- fallback strategy (optional): Method for handling missing fields (skip, error, best-match)
Response Format
Returns a filled PDF as base64 encoded data with metadata including file name and mime type. Uses PDF-lib for reliable form processing.Examples
Basic Usage
Fill simple PDF form:Advanced Usage
Fill complex form with checkboxes and dropdowns:From Artifact
Fill PDF form from previous step:With Custom Mapping
Map data to specific PDF field names:Notes
- Uses PDF-lib for reliable form processing across different PDF types
- Implements multiple fallback strategies for field identification
- Handles text fields, checkboxes, and dropdowns with different methods
- Automatically categorizes fields by type for optimized processing
- Provides comprehensive logging for debugging field matching
- Returns base64 encoded PDF with ‘pdf’ key for proper display
- Supports similarity matching when exact field names don’t match