diff --git a/pdfplumber/utils.py b/pdfplumber/utils.py index 74eaff73..e76eeb86 100644 --- a/pdfplumber/utils.py +++ b/pdfplumber/utils.py @@ -460,6 +460,7 @@ def obj_to_edges(obj): return { "line": lambda x: [ line_to_edge(x) ], "rect": rect_to_edges, + "rect_edge": rect_to_edges, "curve": curve_to_edges, }[obj["object_type"]](obj) diff --git a/tests/test-issues.py b/tests/test-issues.py index 490275fe..55b1a762 100644 --- a/tests/test-issues.py +++ b/tests/test-issues.py @@ -135,6 +135,11 @@ def test_pr_138(self): with pdfplumber.open(path) as pdf: page = pdf.pages[0] assert len(page.chars) == 5140 + page.extract_tables({ + "vertical_strategy": "explicit", + "horizontal_strategy": "lines", + "explicit_vertical_lines": page.curves + page.edges, + }) def test_issue_140(self): path = os.path.join(HERE, "pdfs/issue-140-example.pdf")