diff --git a/camelot/stream.py b/camelot/stream.py index d1ab29b..717759c 100644 --- a/camelot/stream.py +++ b/camelot/stream.py @@ -376,6 +376,8 @@ class Stream: cols = [rotate(0, 0, 0, c, -np.pi / 2)[0] for c in cols] elif table_rotation == 'right': cols = [rotate(0, 0, 0, c, np.pi / 2)[0] for c in cols] + cols.insert(0, text_x_min) + cols.append(text_x_max) cols = [(cols[i], cols[i + 1]) for i in range(0, len(cols) - 1)] else: if self.ncolumns is not None and self.ncolumns[table_no] != -1: diff --git a/tests/test_stream.py b/tests/test_stream.py index aea1dbd..a947b2b 100644 --- a/tests/test_stream.py +++ b/tests/test_stream.py @@ -160,7 +160,7 @@ def test_stream_columns(): ["01","Aguascalientes","001","Aguascalientes","0226","Hacienda Nueva"], ] pdfname = os.path.join(testdir, "mexican_towns.pdf") - manager = Pdf(Stream(columns=["28,67,180,230,425,475,700"], ytol=[10]), pdfname, + manager = Pdf(Stream(columns=["67,180,230,425,475"], ytol=[10]), pdfname, clean=True) tables = manager.extract() assert_equal(tables["page-1"]["table-1"]["data"], data)