diff --git a/HISTORY.md b/HISTORY.md index 88bb661..039578f 100755 --- a/HISTORY.md +++ b/HISTORY.md @@ -4,14 +4,17 @@ Release History master ------ +**Bugfixes** + +* [#293](https://github.com/socialcopsdev/camelot/issues/293) Split text ignores all text to the right of last cut. [#294](https://github.com/socialcopsdev/camelot/pull/294) by Vinayak Mehta. * [#277](https://github.com/socialcopsdev/camelot/issues/277) Sort TableList by order of tables in PDF. [#283](https://github.com/socialcopsdev/camelot/pull/283) by [Sym Roe](https://github.com/symroe). 0.7.2 (2019-01-10) ------------------ - **Bugfixes** +**Bugfixes** - * [#245](https://github.com/socialcopsdev/camelot/issues/245) Fix AttributeError for encrypted files. [#251](https://github.com/socialcopsdev/camelot/pull/251) by Yatin Taluja. +* [#245](https://github.com/socialcopsdev/camelot/issues/245) Fix AttributeError for encrypted files. [#251](https://github.com/socialcopsdev/camelot/pull/251) by Yatin Taluja. 0.7.1 (2019-01-06) diff --git a/camelot/utils.py b/camelot/utils.py index 7b22307..48e39af 100644 --- a/camelot/utils.py +++ b/camelot/utils.py @@ -479,6 +479,10 @@ def split_textline(table, textline, direction, flag_size=False, strip_text=''): (obj.x0 + obj.x1) / 2 <= cut[1]): cut_text.append((r, cut[0], obj)) break + else: + # TODO: add test + if cut == x_cuts[-1]: + cut_text.append((r, cut[0] + 1, obj)) elif isinstance(obj, LTAnno): cut_text.append((r, cut[0], obj)) elif direction == 'vertical' and not textline.is_empty(): @@ -496,6 +500,10 @@ def split_textline(table, textline, direction, flag_size=False, strip_text=''): (obj.y0 + obj.y1) / 2 >= cut[1]): cut_text.append((cut[0], c, obj)) break + else: + # TODO: add test + if cut == y_cuts[-1]: + cut_text.append((cut[0] - 1, c, obj)) elif isinstance(obj, LTAnno): cut_text.append((cut[0], c, obj)) except IndexError: