소스 검색

rm page number exception for pdf parser (#424)

### What problem does this PR solve?

#423 

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
tags/v0.3.0
KevinHuSh 1 년 전
부모
커밋
0499a3f621
No account linked to committer's email address
1개의 변경된 파일1개의 추가작업 그리고 0개의 파일을 삭제
  1. 1
    0
      deepdoc/parser/pdf_parser.py

+ 1
- 0
deepdoc/parser/pdf_parser.py 파일 보기

@@ -830,6 +830,7 @@ class HuParser:
pn = [bx["page_number"]]
top = bx["top"] - self.page_cum_height[pn[0] - 1]
bott = bx["bottom"] - self.page_cum_height[pn[0] - 1]
if pn[-1] - 1 >= len(self.page_images): return ""
while bott * ZM > self.page_images[pn[-1] - 1].size[1]:
bott -= self.page_images[pn[-1] - 1].size[1] / ZM
pn.append(pn[-1] + 1)

Loading…
취소
저장