Explorar el Código

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 hace 1 año
padre
commit
0499a3f621
No account linked to committer's email address
Se han modificado 1 ficheros con 1 adiciones y 0 borrados
  1. 1
    0
      deepdoc/parser/pdf_parser.py

+ 1
- 0
deepdoc/parser/pdf_parser.py Ver fichero

@@ -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)

Cargando…
Cancelar
Guardar