这是一组面向 PDF 表单(AcroForm)场景的「在线工具生成型」AI 提示词。每条 Prompt 都要求 AI 产出:完整项目代码与文件树、可本地运行的命令、可部署到常见平台的说明,并提供可执行的测试用例或 QA checklist,用于快速落地可用的在线 PDF 表单处理工作台。
在线 PDF 表单字段提取与 JSON 导出工具
上传 PDF 后自动解析表单字段,导出结构化 JSON(含字段名、类型、默认值、必填、选项列表与页面坐标)。
英文 Prompt:
You are a senior full-stack engineer. Build a production-ready web app: “PDF Form Field Extractor”.
Goal
- Users upload a PDF (AcroForm). The app extracts all form fields and returns a downloadable JSON.
Tech stack
- Frontend: React + Vite + Type
- Backend: Node.js (Express) or Next.js API routes (choose one and justify)
- PDF parsing: pdf-lib (preferred) + fallback notes if the PDF is XFA or unsupported
Requirements
1) UI
- Drag-and-drop upload, progress indicator, and a results panel with a searchable table of fields.
- “Download JSON” button.
2) Output JSON schema
- Include: fieldName, fieldType, pageIndex, rect[x,y,w,h], required, defaultValue, options (for choice fields), maxLength (if available), and raw .
3) Deliverables (must output all)
- Full project file tree
- Complete source code for every file
- Local run commands
- Environment variables (if any)
- Deployment guide (Vercel/Render/Docker)
4) Testing / QA
- Provide at least 8 QA checks, including: extraction correctness, handling encrypted PDF, large files, missing fields, choice fields, coordinate sanity, and download validity.
5) Security & privacy
- Do not log PDFs; add size limits; explain how temporary files are handled.
Return
- A complete runnable project, no placeholders.
中文释义: 让 AI 生成一个可部署的在线工具:解析 PDF 表单字段并输出标准化 JSON;包含前后端代码、运行命令、部署方式,以及覆盖加密/大文件/字段类型差异等场景的 QA 清单。
在线 PDF 表单字段可视化预览与定位标注工具
在浏览器内渲染 PDF,叠加显示字段框与字段名,支持点击高亮与复制字段路径。
英文 Prompt:
Build a web tool: “PDF Form Field Visual Inspector”.
Scope
- Client-side PDF rendering with pdf.js.
- Overlay bounding boxes for AcroForm fields, with hover tooltip and click-to-focus.
Tech
- React + Type + Vite
- pdf.js for rendering
- pdf-lib (or equivalent) to obtain field rectangles and map them to pdf.js viewport coordinates
Features
- Upload PDF
- Render first page; page navigation
- Toggle overlays on/off
- Field list (left sidebar) with search, clicking a row scrolls/zooms to the field
- Copy field name button
Deliverables
- Full file tree + code
- Run commands
- Minimal deployment guide
QA checklist (>= 7)
- Coordinate mapping accuracy on different zoom levels
- Multiple pages
- Fields without rects
- Radio/checkbox groups
- Performance on 50+ fields
- Mobile viewport behavior
- Accessibility (keyboard navigation for list)
Explain
- How you convert PDF rect coordinates to screen coordinates (include formula and code).
中文释义: 让 AI 产出一个在线“字段可视化检查器”:用 pdf.js 渲染 PDF,用叠加层标出表单字段位置;附带坐标映射逻辑、可运行项目与 QA 清单。
在线 JSON/CSV 批量填充 PDF 表单并导出新文件工具
上传模板 PDF + 一份 JSON/CSV 数据,按映射规则批量生成多份填充后的 PDF,支持打包下载。
英文 Prompt:
Create a full-stack app: “Bulk PDF Form Filler”.
User flow
1) Upload a template PDF (AcroForm).
2) Upload data file (JSON array or CSV).
3) Configure mapping: CSV column -> PDF field name, with default values.
4) Generate filled PDFs, preview one sample, then download all as a ZIP.
Stack
- Next.js (App Router) + Type
- Server-side filling using pdf-lib
- ZIP: archiver (Node) or jszip
Functional requirements
- Validate required fields and show per-row errors.
- Option to flatten the form after filling.
- Filename template like {rowIndex}-{field:Name}.pdf
Deliverables
- File tree + full code
- Commands for dev and build
- Deployment instructions
Tests/QA (>= 10)
- CSV parsing edge cases (quotes, commas)
- Missing columns
- Large batch (200 rows)
- Flatten on/off
- Unicode input
- Checkbox/radio
- Dropdown options mismatch
- ZIP integrity
- Memory usage
- Error reporting correctness
中文释义: 让 AI 生成“批量填充”在线工具:支持 JSON/CSV 映射字段、批量产出 PDF 并打包下载;必须带字段校验、错误报告、运行/部署与 QA 用例。
在线 PDF 表单必填与格式规则校验器(含报告导出)
上传已填写 PDF,按可编辑规则校验必填、正则格式、数值范围与日期合法性,导出 HTML/JSON 报告。
英文 Prompt:
Build “PDF Form Validator” web app.
Goal
- Users upload a filled PDF. The app extracts field values and validates them against a rule set.
Rules
- Rules stored as JSON: required, regex, min/max, allowedValues, dateFormat.
- Provide a rule editor UI with validation and sample preview.
Stack
- React + Type
- Backend: Node/Express
- pdf-lib for reading field values
Outputs
- On-screen validation summary (pass/fail counts)
- Downloadable JSON report
- Downloadable HTML report (print-friendly)
Deliverables
- File tree + full code
- Run commands
- Deployment guide
QA checklist (>= 8)
- Empty strings vs missing
- Regex and unicode
- Date parsing
- Number parsing
- Allowed values mismatch
- Large PDFs
- Report download
- Rule editor persistence (localStorage)
中文释义: 让 AI 输出一个“表单校验”在线工具:规则可视化编辑,上传 PDF 后自动校验并导出报告;交付完整代码、运行与部署说明、QA checklist。
在线 PDF 表单字段差异对比(模板 vs 实例)工具
对比两份 PDF:字段集合差异、字段属性变化与值差异,输出可下载的 diff 报告。
英文 Prompt:
Implement “PDF Form Diff” tool.
Inputs
- PDF A and PDF B (AcroForm).
Compare
- Field presence: added/removed
- Field data changes: type, required, options
- Field value changes (if present)
UI
- Side-by-side summary + filter by change type
- Export diff as JSON and Markdown
Stack
- React + Type + Vite
- Backend optional; if client-only, explain limitations and handle files in-browser
Deliverables
- Full project code and file tree
- Commands
- Deployment notes
QA (>= 7)
- Different field order
- Same name but different type
- Choice options changes
- Empty vs null
- Large field counts
- Export correctness
- Security: no file retention
中文释义: 让 AI 生成“字段差异对比”在线工具:找出字段新增/删除/属性变化/值变化,并导出 diff 报告;要求可运行代码+部署说明+QA。
在线 PDF 表单字段映射模板生成器(JSON Schema 驱动)
输入业务 JSON Schema,自动生成字段命名建议、映射模板与校验规则草稿,用于批量填充工作流。
英文 Prompt:
Build “PDF Field Mapping Template Generator”.
Function
- User uploads a JSON Schema (or pastes JSON).
- The app generates:
a) Suggested PDF field names
b) A mapping template (CSV columns -> PDF fields)
c) Validation rules JSON (required/regex/range)
UI
- Schema input area
- Generated outputs with copy/download buttons
- Explanation panel describing assumptions
Stack
- React + Type
- No backend required; keep everything in-browser
Deliverables
- File tree + full code
- Run commands
- Deployment guide
QA (>= 6)
- Invalid schema handling
- Nested s and arrays
- Required fields extraction
- Regex formats
- Download functionality
- Large schema performance
中文释义: 让 AI 产出一个“映射模板生成器”:由 JSON Schema 自动生成字段命名建议、映射模板与规则草案,适配 PDF 表单填充与校验;包含完整工程与 QA。
在线 PDF 表单字段权限与隐私审计工具(本地处理模式)
检测 PDF 是否含脚本、是否可编辑/可提取内容等权限标记,并提供“全程本地处理”模式说明。
英文 Prompt:
Create “PDF Privacy & Permission Audit” web app.
Checks
- Encryption status, permissions flags (printing, copying, form filling)
- Presence of actions (if detectable)
- data summary
Mode
- Client-only processing using WebAssembly or pure JS libraries.
- Explicitly document that files never leave the browser.
Stack
- React + Type
- Use pdf-lib / pdf.js where appropriate
Deliverables
- Full code + file tree
- Run commands
- Deployment notes
QA (>= 7)
- Encrypted PDF
- Permission flags parsing
- data extraction
- Large file behavior
- Browser compatibility
- Accessibility
- Clear UX copy for privacy claims
中文释义: 让 AI 生成“隐私与权限审计”在线工具:解析加密/权限/脚本/元数据,强调本地处理;交付完整源码、运行部署与 QA。
在线 PDF 表单处理工作台(组合式流水线:提取→映射→填充→校验→报告)
把常见能力串成可配置流水线:先提取字段,再建立映射,批量填充并校验,最后生成汇总报告与下载包。
英文 Prompt:
Build a “PDF Form Pipeline Workbench” application.
Pipeline steps
1) Extract fields from template PDF
2) Configure mapping (UI)
3) Bulk fill from CSV/JSON
4) Validate with rules
5) Export: filled PDFs ZIP + validation reports ZIP
Non-functional
- Clear module boundaries, reusable components
- Use streaming where possible to avoid memory blowups
- Provide Dockerfile
Deliverables (required)
- Full monorepo file tree
- Complete code
- Commands (dev/build)
- Deployment (Docker + one PaaS option)
- Test plan: at least 12 QA items covering each pipeline step
Return a complete runnable project with no missing files.
中文释义: 让 AI 产出一个可部署的“组合式工作台”:把字段提取、映射、批量填充、规则校验、报告导出串联成流水线;必须包含完整工程、Docker/部署、以及覆盖全链路的 QA 清单。