From c030211fdc735197d08b3eeaac4b77c37d51d558 Mon Sep 17 00:00:00 2001 From: hl2311 Date: Sat, 22 Mar 2025 02:37:46 +0700 Subject: [PATCH] Fix: Add missing bbox attribute to PdfTextCell --- docling/models/page_preprocessing_model.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docling/models/page_preprocessing_model.py b/docling/models/page_preprocessing_model.py index 9dc291a9..58cfead0 100644 --- a/docling/models/page_preprocessing_model.py +++ b/docling/models/page_preprocessing_model.py @@ -63,7 +63,7 @@ class PagePreprocessingModel(BasePageModel): def draw_text_boxes(image, cells, show: bool = False): draw = ImageDraw.Draw(image) 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") if show: image.show()