title: How to parse pdf using tika library
body: <p>I am trying to parse a pdf file using <code>tika</code> library but I am getting this complicated error</p>
  
  <pre><code>Traceback (most recent call last):
    File "/home/olivia/.local/lib/python3.6/site-packages/urllib3/connection.py", line 141, in _new_conn
      (self.host, self.port), self.timeout, **extra_kw)
    File "/home/olivia/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 83, in create_connection
      raise err
    File "/home/olivia/.local/lib/python3.6/site-packages/urllib3/util/connection.py", line 73, in create_connection
      sock.connect(sa)
  ConnectionRefusedError: [Errno 111] Connection refused
  </code></pre>
  
  <p>Code</p>
  
  <pre><code>import tika
  from tika import parser
  parsed = parser.from_file('simple1.pdf')
  print(parsed["content"])
  </code></pre>
  
  <p>Same error is comming while using its wrapper</p>
  
  <pre><code>from tikapp import TikaApp
  tika_client = TikaApp(file_jar="/opt/tika/tika-app-1.15.jar")
  tika_client.extract_only_content("simple1.pdf")
  </code></pre>
  
  <p>For detailed error <a href="http://pasted.co/4ed65483" rel="nofollow noreferrer">see</a></p>