From b5628f12273297d9db1393f4b734cfa337caa8c9 Mon Sep 17 00:00:00 2001 From: manuflexor <113829628+manuflexor@users.noreply.github.com> Date: Fri, 19 Sep 2025 13:42:29 +0200 Subject: [PATCH] fix: correct y-axis scaling in draw_table_cells (#2287) * Fix y axis * DCO Remediation Commit for manuflexor I, manuflexor , hereby add my Signed-off-by to this commit: cd56622d4feb43e567cde4fd640d7b853c3ab772 Signed-off-by: manuflexor --------- Signed-off-by: manuflexor --- docling/models/table_structure_model.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docling/models/table_structure_model.py b/docling/models/table_structure_model.py index 30415d1d..e303e817 100644 --- a/docling/models/table_structure_model.py +++ b/docling/models/table_structure_model.py @@ -121,7 +121,7 @@ class TableStructureModel(BasePageModel): for table_element in tbl_list: x0, y0, x1, y1 = table_element.cluster.bbox.as_tuple() - y0 *= scale_x + y0 *= scale_y y1 *= scale_y x0 *= scale_x x1 *= scale_x @@ -132,7 +132,7 @@ class TableStructureModel(BasePageModel): x0, y0, x1, y1 = cell.rect.to_bounding_box().as_tuple() x0 *= scale_x x1 *= scale_x - y0 *= scale_x + y0 *= scale_y y1 *= scale_y draw.rectangle([(x0, y0), (x1, y1)], outline="green") @@ -142,7 +142,7 @@ class TableStructureModel(BasePageModel): x0, y0, x1, y1 = tc.bbox.as_tuple() x0 *= scale_x x1 *= scale_x - y0 *= scale_x + y0 *= scale_y y1 *= scale_y if tc.column_header: