title: How to print a PDF file in django 2
body: <p>I am new in Django I try to develop a <strong>POS</strong> system where a user clicks on a button and a <strong>PDF</strong> will <strong>print</strong> I can generate PDF but I cannot <strong>print</strong> <strong>that PDF</strong></p>
  
  <p>Here is my code where I was trying to print the PDF file</p>
  
  <pre><code>import os
      def printPDf(request, id):
      context = AuthUser.objects.filter(id=id)
      pdf = render_to_pdf('invoice.html', {'context': context})
      response = HttpResponse(pdf, content_type='application/pdf')
      os.system('lp -d HPLaserJ {0}'.format(response.strip()))
  </code></pre>