Issue title: Issue with searchable PDF #1889 - Reopened
 Issue body: The fix for #1889 is incomplete without removing the following two lines from the function.

if (!filename)
    return false;


_Originally posted by @FarhadKhalafi in https://github.com/tesseract-ocr/tesseract/issue_comments#issuecomment-423834649_
 Comments: 
 Comment 0: duplicate #1889.
{'source': 'GithubIssues', 'repo_name_with_owner': 'tesseract-ocr/tesseract', 'issue_id': 362963124, 'repo_stars': 47258.0}