Skip to content

Commit

Permalink
fix coordinate error (#686)
Browse files Browse the repository at this point in the history
### What problem does this PR solve?

#683 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
  • Loading branch information
KevinHuSh committed May 8, 2024
1 parent 7ddb2f1 commit 99be226
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions deepdoc/parser/pdf_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -749,6 +749,7 @@ def cropout(bxs, ltype, poss):
"layoutno", "")))

left, top, right, bott = b["x0"], b["top"], b["x1"], b["bottom"]
if right < left: right = left + 1
poss.append((pn + self.page_from, left, right, top, bott))
return self.page_images[pn] \
.crop((left * ZM, top * ZM,
Expand Down

0 comments on commit 99be226

Please sign in to comment.