Update manual.py

This commit is contained in:
Kevin Hu 2025-12-09 18:49:35 +08:00 committed by GitHub
parent b970d4b425
commit 520c7680dc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -229,11 +229,10 @@ def chunk(filename, binary=None, from_page=0, to_page=100000,
txt, layoutno, poss = section
if isinstance(poss, str):
poss = pdf_parser.extract_positions(poss)
if poss:
poss = pdf_parser.extract_positions(poss)
first = poss[0] # tuple: ([pn], x1, x2, y1, y2)
pn = first[0]
if isinstance(pn, list) and pn:
pn = pn[0] # [pn] -> pn
poss[0] = (pn, *first[1:])