Skip to content

[BUG]: Generated PDF fills incorrect values into detected form fields #276

@qngu0461

Description

@qngu0461

name: 🐛 Incorrect PDF field mapping
about: Create a report to help us improve FireForm.
title: "[BUG]: Generated PDF fills incorrect values into detected form fields"
labels: bug
assignees: ''


⚡️ Describe the Bug

make exec completes successfully and generates a filled PDF, but the values are placed into the wrong fields.
The generated output repeats the same values across multiple fields and assigns clearly incorrect values, for example:

  • John Doe is repeated in multiple unrelated fields
  • managing director is written into fields like phone number and date
  • the signature is rendered incorrectly as Johno Doe

So the issue is not a crash — it is incorrect field-to-value mapping in the generated PDF.

👣 Steps to Reproduce

m1. Build and start the containers
2. Run:

make exec
3. Let the process complete and generate the output PDF
4. Open the generated PDF
5. Observe that the filled values do not match the correct form fields

## 📉 Expected Behavior: 
The generated PDF should place each extracted value into the correct field.
For example:
name should go to the name field
job title should go to the job title field
phone number should not contain a job title
date should not contain managing director
signature text should not be altered

## 🖥️ Environment Information
OS: macOS
Docker/Compose Version: Docker 29.2.1
Ollama Model used: mistral:latest

## 📸 Screenshots/Logs
![Image](https://github.com/user-attachments/assets/b5d8e3a5-832a-44a7-9eeb-e7ce66052baa)
![Image](https://github.com/user-attachments/assets/90f8ba6a-b9d2-438f-936f-56f882348168)

## 🕵️ Possible Fix:
Problem is in the main.py file, I will fix later

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions