diff --git a/camelot/lattice.py b/camelot/lattice.py index 44b8862..79a6cf7 100644 --- a/camelot/lattice.py +++ b/camelot/lattice.py @@ -255,10 +255,10 @@ class Lattice: areas = [] for area in self.table_area: x1, y1, x2, y2 = area.split(",") - x1 = int(x1) - y1 = int(y1) - x2 = int(x2) - y2 = int(y2) + x1 = float(x1) + y1 = float(y1) + x2 = float(x2) + y2 = float(y2) x1, y1, x2, y2 = scale_to_image((x1, y1, x2, y2), factors_image) areas.append((x1, y1, abs(x2 - x1), abs(y2 - y1))) table_bbox = find_table_joints(areas, vmask, hmask) diff --git a/camelot/stream.py b/camelot/stream.py index 35f40eb..bf5260e 100644 --- a/camelot/stream.py +++ b/camelot/stream.py @@ -319,10 +319,10 @@ class Stream: table_bbox = {} for area in self.table_area: x1, y1, x2, y2 = area.split(",") - x1 = int(x1) - y1 = int(y1) - x2 = int(x2) - y2 = int(y2) + x1 = float(x1) + y1 = float(y1) + x2 = float(x2) + y2 = float(y2) table_bbox[(x1, y2, x2, y1)] = None else: table_bbox = {(0, 0, width, height): None}