KevinHuSh
commited on
Commit
·
d684fd5
1
Parent(s):
66d1750
fix coordinate error (#686)
Browse files### What problem does this PR solve?
#683
### Type of change
- [x] Bug Fix (non-breaking change which fixes an issue)
deepdoc/parser/pdf_parser.py
CHANGED
@@ -749,6 +749,7 @@ class RAGFlowPdfParser:
|
|
749 |
"layoutno", "")))
|
750 |
|
751 |
left, top, right, bott = b["x0"], b["top"], b["x1"], b["bottom"]
|
|
|
752 |
poss.append((pn + self.page_from, left, right, top, bott))
|
753 |
return self.page_images[pn] \
|
754 |
.crop((left * ZM, top * ZM,
|
|
|
749 |
"layoutno", "")))
|
750 |
|
751 |
left, top, right, bott = b["x0"], b["top"], b["x1"], b["bottom"]
|
752 |
+
if right < left: right = left + 1
|
753 |
poss.append((pn + self.page_from, left, right, top, bott))
|
754 |
return self.page_images[pn] \
|
755 |
.crop((left * ZM, top * ZM,
|