fix coordinate error (#686)

### What problem does this PR solve?

#683 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
KevinHuSh 2024-05-08 20:00:14 +08:00 committed by GitHub
parent 7ddb2f19be
commit 99be226c7c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -749,6 +749,7 @@ class RAGFlowPdfParser:
"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,