-
Notifications
You must be signed in to change notification settings - Fork 113
Open
Description
name: π Bug Report
about: Create a report to help us improve FireForm.
title: "[BUG]: Multi-page PDF filling resets answer index and misaligns fields"
labels: bug
assignees: @Aryama-srivastav
β‘οΈ Describe the Bug
In PDF filling logic, the answer index is reset for each page (i = 0 inside the page loop), so multi-page forms can re-use early answers on later pages instead of continuing sequentially.
This causes field/value misalignment and incorrect output PDFs when the template has form widgets across multiple pages.
π£ Steps to Reproduce
- Use a fillable PDF with widget fields on at least 2 pages.
- Provide enough extracted values to populate fields across both pages.
- Run the fill flow (Controller/FileManipulator/Filler path).
- Inspect output PDF values on page 2: early values are repeated or later values are skipped.
π Expected Behavior
The answer cursor should continue globally across all pages:
- page 1 fills first N values
- page 2 continues from value N+1
- no value repetition caused by per-page index reset
π₯οΈ Environment Information
- OS: (e.g. Ubuntu 22.04, MacOS M2, Windows 11)
- Docker/Compose Version: (output of
docker --versionanddocker compose version) - Ollama Model used: (e.g. Mistral-7b)
π΅οΈ Possible Fix
Pseudo-fix:
i = 0
for page in pdf.pages:
...
for annot in sorted_annots:
if is_widget and i < len(answers_list):
annot.V = f"{answers_list[i]}"
i += 1Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels