From a95b771b2d79a8151cf62b958b4ebbf0e4cd6ad4 Mon Sep 17 00:00:00 2001 From: Sanjin <102841251+duckduckgrayduck@users.noreply.github.com> Date: Tue, 26 Sep 2023 08:53:17 -0500 Subject: [PATCH] Testing --- main.py | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/main.py b/main.py index 96ee4b4..48a9fa1 100644 --- a/main.py +++ b/main.py @@ -40,14 +40,15 @@ def main(self): y1 = word_bounding_box[0][1] x2 = word_bounding_box[1][0] y2 = word_bounding_box[1][1] - position_info = { - "text": word_value, - "x1": float(x1), - "x2": float(x2), - "y1": float(y1), - "y2": float(y2), - } - dc_page["positions"].append(position_info) + if word['value']: + position_info = { + "text": word_value, + "x1": float(x1), + "x2": float(x2), + "y1": float(y1), + "y2": float(y2), + } + dc_page["positions"].append(position_info) text += line_text.strip() + '\n' text += '\n' dc_page['text'] = text