Skip to content

[FEAT]: Smart Output Renaming based on Extracted LLM DataΒ #176

@Cubix33

Description

@Cubix33

πŸ“ Description

Currently, the tool saves the filled PDF using a static or generic filename. When processing multiple documents, this requires the user to manually rename the outputs to keep track of who the form belongs to.

πŸ› οΈ Proposed Solution

  • Add logic in main.py (or wherever the save function is called) to inspect the final JSON dictionary before saving.
  • Look for common identifying keys (e.g., "Name", "Employee Name", "Patient Name").
  • Dynamically construct the output filename: {Original_PDF_Name}_{Extracted_Name}.pdf.
  • Fallback to a timestamped name if no identifier is found.

βœ… Acceptance Criteria

  • Running form.pdf with John Doe's transcript outputs form_John_Doe.pdf.
  • Special characters and spaces in the extracted name are sanitized (e.g., replaced with underscores) to prevent file system errors.

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