mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-30 14:04:27 +00:00
Fix: Add missing bbox attribute to PdfTextCell
This commit is contained in:
parent
7df157204b
commit
c030211fdc
@ -63,7 +63,7 @@ class PagePreprocessingModel(BasePageModel):
|
|||||||
def draw_text_boxes(image, cells, show: bool = False):
|
def draw_text_boxes(image, cells, show: bool = False):
|
||||||
draw = ImageDraw.Draw(image)
|
draw = ImageDraw.Draw(image)
|
||||||
for c in cells:
|
for c in cells:
|
||||||
x0, y0, x1, y1 = c.bbox.as_tuple()
|
x0, y0, x1, y1 = c.to_bounding_box().l, c.to_bounding_box().t, c.to_bounding_box().r, c.to_bounding_box().b
|
||||||
draw.rectangle([(x0, y0), (x1, y1)], outline="red")
|
draw.rectangle([(x0, y0), (x1, y1)], outline="red")
|
||||||
if show:
|
if show:
|
||||||
image.show()
|
image.show()
|
||||||
|
Loading…
Reference in New Issue
Block a user