def _valid_pdf(self, path, filename):
<EOL>if os.path.isfile(path) and path.lower().endswith("<STR_LIT>"):<EOL><INDENT>return True<EOL><DEDENT>else:<EOL><INDENT>full_path = os.path.join(path, filename)<EOL>if os.path.isfile(full_path) and full_path.lower().endswith("<STR_LIT>"):<EOL><INDENT>return True<EOL><DEDENT>elif os.path.isfile(os.path.join(path, filename + "<STR_LIT>")):<EOL><INDENT>return True<EOL><DEDENT>elif os.path.isfile(os.path.join(path, filename + "<STR_LIT>")):<EOL><INDENT>return True<EOL><DEDENT><DEDENT>return False<EOL>
Verify that the file exists and has a PDF extension.