Skip to content

Commit

Permalink
fix #317: sorted words in line
Browse files Browse the repository at this point in the history
  • Loading branch information
greendreamer authored and green0317 committed Sep 23, 2024
1 parent f8516f9 commit b89f53f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pdf2docx/text/Lines.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ def split_vertically_by_text(self, line_break_free_space_ratio:float, new_paragr
'''
rows = self.group_by_physical_rows()

for row in rows:
row.sort_in_line_order() # sort lines in row

# skip if only one row
num = len(rows)
if num==1: return rows
Expand Down

0 comments on commit b89f53f

Please sign in to comment.