modesty / modesty/pdf2json

Annotations / Field Names - Incorrect name for fields

Open
#167 2 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
2.2k
Forks
394
Avg merge
3d 5h
Merged PRs (30d)
7

Description

When loading the PDF and reading the data, the field names come out as incorrect. This seems to occur when the field name has punctuation in it like "10.1.2_Name".

Instead of the correct field name, it seems the "10.1." is removed from it and results in "2_Name" being written into the data.

The area affected seems to be in

base/shared/annotation.js

By using the commented code which builds the data.fullName. I am able to achieve the correct result, otherwise as it is currently, the result is wrong.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in base/shared/annotation.js and inspect the commented code that builds data.fullName. Reproduce the issue by loading a PDF with a field named "10.1.2_Name", then compare the parsed field name with the expected full name. Done means punctuation is preserved and the resulting data contains "10.1.2_Name" rather than "2_Name".

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
backend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.