Skip to content

Commit

Permalink
Fix issue #176, re. extract_table ignoring kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvine committed Apr 1, 2020
1 parent bc95486 commit b498df2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pdfplumber/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,13 @@ def find_tables(self, table_settings={}):

def extract_tables(self, table_settings={}):
tables = self.find_tables(table_settings)
return [ table.extract() for table in tables ]

extract_kwargs = dict((k, table_settings["text_" + k]) for k in [
"x_tolerance",
"y_tolerance",
] if "text_" + k in table_settings)

return [ table.extract(**extract_kwargs) for table in tables ]

def extract_table(self, table_settings={}):
tables = self.find_tables(table_settings)
Expand Down

0 comments on commit b498df2

Please sign in to comment.