From 7cf92f933ac827e2d3dd3efd857abd0e822825fb Mon Sep 17 00:00:00 2001 From: Jacob Fenton Date: Thu, 10 Mar 2016 10:01:54 -0800 Subject: [PATCH] Fix bug that leaves out first char found after width differential greater than x_tolerance --- pdfplumber/utils.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/pdfplumber/utils.py b/pdfplumber/utils.py index 6c7d35c..87b6a10 100644 --- a/pdfplumber/utils.py +++ b/pdfplumber/utils.py @@ -118,8 +118,7 @@ def extract_words(chars, x_tolerance=0, y_tolerance=0): if char["x0"] > (last_char["x1"] + tolerance): words.append(current_word) current_word = [] - else: - current_word.append(char) + current_word.append(char) if len(current_word) > 0: words.append(current_word)