diff --git a/pdfsearch/pdfsearch.py b/pdfsearch/pdfsearch.py index 14b41f7..35bfd4e 100644 --- a/pdfsearch/pdfsearch.py +++ b/pdfsearch/pdfsearch.py @@ -79,7 +79,7 @@ def search_pdf(pdf_name, search_patterns, context_length): page_num = i + 1 page = reader.getPage(i) try: - page_text = page.extractText().replace('\n', '') + page_text = page.extractText().replace('\n', ' ') # Skip page if text cannot be read except (KeyError, ZLibError): continue