fix presentation
This commit is contained in:
parent
948bc93786
commit
22ebf703f7
1 changed files with 3 additions and 2 deletions
|
|
@ -227,8 +227,9 @@ def chunk(filename, binary=None, from_page=0, to_page=100000,
|
||||||
for pn, (txt, img) in enumerate(sections):
|
for pn, (txt, img) in enumerate(sections):
|
||||||
d = copy.deepcopy(doc)
|
d = copy.deepcopy(doc)
|
||||||
pn += from_page
|
pn += from_page
|
||||||
if img:
|
if not isinstance(img, Image.Image):
|
||||||
d["image"] = img
|
img = None
|
||||||
|
d["image"] = img
|
||||||
d["page_num_int"] = [pn + 1]
|
d["page_num_int"] = [pn + 1]
|
||||||
d["top_int"] = [0]
|
d["top_int"] = [0]
|
||||||
d["position_int"] = [(pn + 1, 0, img.size[0] if img else 0, 0,
|
d["position_int"] = [(pn + 1, 0, img.size[0] if img else 0, 0,
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue