From defaead6790f5737c348bc1106e6797cf480cee5 Mon Sep 17 00:00:00 2001 From: Vinayak Mehta Date: Sun, 4 Nov 2018 01:33:41 +0530 Subject: [PATCH] Add table bbox attribute (#193) --- camelot/parsers/lattice.py | 1 + camelot/parsers/stream.py | 1 + 2 files changed, 2 insertions(+) diff --git a/camelot/parsers/lattice.py b/camelot/parsers/lattice.py index 7b7c4111..22c77e89 100644 --- a/camelot/parsers/lattice.py +++ b/camelot/parsers/lattice.py @@ -362,6 +362,7 @@ def extract_tables(self, filename): self.table_bbox.keys(), key=lambda x: x[1], reverse=True)): cols, rows, v_s, h_s = self._generate_columns_and_rows(table_idx, tk) table = self._generate_table(table_idx, cols, rows, v_s=v_s, h_s=h_s) + table._bbox = tk _tables.append(table) return _tables diff --git a/camelot/parsers/stream.py b/camelot/parsers/stream.py index 6aee9668..709f01de 100644 --- a/camelot/parsers/stream.py +++ b/camelot/parsers/stream.py @@ -361,6 +361,7 @@ def extract_tables(self, filename): self.table_bbox.keys(), key=lambda x: x[1], reverse=True)): cols, rows = self._generate_columns_and_rows(table_idx, tk) table = self._generate_table(table_idx, cols, rows) + table._bbox = tk _tables.append(table) return _tables