title: how to open pdf file using pypdf2
body: <p>I tried to open a pdf file using <code>pypdf</code> in Google Colab using</p>
  
  <pre><code>import PyPDF2 as pdf2
  with open("sample.pdf", "r+") as f:
     pdf = pdf2.PdfFileReader(f)
  </code></pre>
  
  <p>but I get following error:</p>
  
  <pre><code>UnsupportedOperation: can't do nonzero end-relative seeks
  </code></pre>
  
  <p>Changing the mode form "r" to "r+" does not resolve the problem. What is the cause of this error and how can I solve it?</p>