code: def has_textonly_pdf():
      
      args_tess = ['tesseract', '--print-parameters', 'pdf']
      params = ''
      try:
          params = check_output(args_tess, universal_newlines=True, stderr=STDOUT)
      except CalledProcessError as e:
          print("Could not --print-parameters from tesseract", file=sys.stderr)
          raise MissingDependencyError from e
      if 'textonly_pdf' in params:
          return True
      return False
docs: Does Tesseract have textonly_pdf capability?
  
      Available in v4.00.00alpha since January 2017. Best to
      parse the parameter list