title: Display pdf file with proper indentation
body: <p>I want to Display Pdf file on webpage. The Pdf File contains Python Program which has indentation. But while displaying the file i am not able to get the proper spacing as in the pdf.</p>
  
  <pre><code>import PyPDF2
  def read_file(request):
      pdfFileObj = open('media/documents/from_django.pdf', 'rb')
      pdfReader = PyPDF2.PdfFileReader(pdfFileObj)
      pageObj = pdfReader.getPage(0)
      text=pageObj.extractText()
      pdfFileObj.close()
      context = {'file_content': text}
      return render(request, "file.html", context)
  
  
  
  HTML
  
  &lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
      &lt;title&gt;File&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
  {{ file_content}}
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>