Просмотр исходного кода

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 год назад
Родитель
Сommit
0499a3f621
Аккаунт пользователя с таким Email не найден
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)

Загрузка…
Отмена
Сохранить