title: How to add watermark to pdf file?
body: <p>How to add watermark to pdf file generated from this code?</p>
  
  <pre><code>import xhtml2pdf
  from xhtml2pdf import pisa
  
  def delivery_cancel(request, did):
      d_instance = get_object_or_404(Delivery, pk=did, user=request.user)
      users = request.user.get_profile()
      user = request.user
      contents = render_to_string('delivery_cancel.html', {'delivery':d_instance,'users':users,'user':user})
      response = HttpResponse(mimetype='application/pdf')
      response['Content-Disposition'] = 'inline; filename=mypdf.pdf'
      result = StringIO.StringIO()
      pdf = pisa.pisaDocument(StringIO.StringIO(contents.encode('utf-8')), result, show_error_as_pdf=True, encoding='UTF-8')
      response.write(result.getvalue())
      result.close()
      return response
  </code></pre>
  
  <p>I tried to use reportlab but I failed so I'm asking for another solution.</p>