title: Reading pdf files line by line using python
body: <p>I used the following code to read the pdf file, but it does not read it. What could possibly be the reason?</p>
  <pre class="lang-py prettyprint-override"><code>from PyPDF2 import PdfFileReader
  
  reader = PdfFileReader(&quot;example.pdf&quot;)
  contents = reader.pages[0].extractText().split(&quot;\n&quot;)
  print(contents)
  </code></pre>
  <p>The output is [u''] instead of reading the content.</p>