modesty / modesty/pdf2json

How to detect the HLines correctly?

Open
#331 0 comments 0 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

Dear all,
I like to know how to detect the hLines correctly.

  • Which module does it?
  • How to improve it?

See the picture: No HLine deteced.

The Fille might be seen as kind of but why is it so difficult to see the lines?
Thank You all for Your contributions!

Testfile to receive from: https://www.cftc.gov/media/10156/AI_RFC_012524/download
Result header of first page:
{"Transcoder":"pdf2json@3.0.5 [https://github.com/modesty/pdf2json]",
"Meta":{"PDFFormatVersion":"1.6", "IsAcroFormPresent":false,"IsXFAPresent":false,"
Title":"Request for Comment on the Use of Artificial Intelligence in CFTC-Regulated Markets",
"Author":"CFTC","Subject":"Request for Comment on the Use of Artificial Intelligence in CFTC-Regulated Markets",
"Keywords":"","Creator":"Acrobat PDFMaker 23 for Word", "Producer":"Adobe PDF Library 23.6.156", "CreationDate":"D:20240125143132-05'00'","ModDate":"D:20240125172143-05'00'"}},
"Pages":[{"Width":38.25,"Height":49.5**,"HLines":[],"VLines":[],**
"Fills":[{"x":4.5,"y":36.57,"w":9,"h":0.045,"oc":"#000"},
{"x":7.755,"y":40.5,"w":19.957,"h":0.03,"oc":"#006fc0"}],
image

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 by reproducing the result with the linked CFTC PDF and inspect the generated Pages.HLines, VLines, and Fills fields. The issue names no source file, test, or module; done should establish which module handles line detection and whether the reported horizontal lines are represented correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.