Skip to content

Commit

Permalink
Merge pull request #1053 from myhloli/dev
Browse files Browse the repository at this point in the history
fix(pdf_parse): improve line stop flag detection accuracy
  • Loading branch information
myhloli authored Nov 21, 2024
2 parents 9e4d6a4 + ae3b0a1 commit a9281f1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions magic_pdf/pdf_parse_union_core_v2.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,7 @@ def calculate_char_in_span(char_bbox, span_bbox, char_is_line_stop_flag):
if char_is_line_stop_flag:
if (
(span_bbox[2] - span_height) < char_bbox[0] < span_bbox[2]
and char_center_x > span_bbox[0]
and span_bbox[1] < char_center_y < span_bbox[3]
and abs(char_center_y - span_center_y) < span_height / 4
):
Expand Down

0 comments on commit a9281f1

Please sign in to comment.