title: HTML to PDF with python and wkhtmltopdf
body: <p>I have just found <a href="https://code.google.com/p/wkhtmltopdf/" rel="nofollow">wkhtmltopdf</a>, amazing html converter using webkit. I have tried it on my dev machine and its simple and works well. </p>
  
  <p><em>How can this best be integrated with a django based site?</em> </p>
  
  <p>I found the <a href="https://github.com/mreiferson/py-wkhtmltox" rel="nofollow">python bindings</a>, but they presume a certain level of understanding of how to install things I just don't have. e.g.</p>
  
  <pre><code>you need libwkhtmltox.* somewhere in your LD path (/usr/local/lib)
  you need the directory src/include/wkhtmltox from wkhtmltopdf
      somewhere on your include path (/usr/local/include)
  </code></pre>
  
  <ul>
  <li><p>After installing those python bindings, how do I use them? What calls can I do? </p></li>
  <li><p>Does the resulting pdf have to be saved to the hd or can I stream it out of a view with something?</p></li>
  </ul>
  
  <p>For example:</p>
  
  <pre><code>response['Content-Disposition'] = 'attachment; filename='+letter_name
  response['Content-Type'] = 'Content-type: application/octet-stream'
  response['Content-Length'] = bytes
  return response
  </code></pre>