title: Docraptor API Django get PDF to download
body: <p>I am trying to use Docraptor in Django 2.0 and Python 3.</p>
  
  <p>I can get the PDF to generate to their website but not download to my system.</p>
  
  <p>Here is their code from <a href="https://github.com/DocRaptor/docraptor-python" rel="nofollow noreferrer">https://github.com/DocRaptor/docraptor-python</a></p>
  
  <p>What needs to change to download the pdf file?</p>
  
  <pre><code>doc_api = docraptor.DocApi()
  
  try:
  
    create_response = doc_api.create_doc({
      "test": True,       
      "document_content": "&lt;html&gt;&lt;body&gt;Hello World&lt;/body&gt;&lt;/html&gt;",
      "name": "docraptor-python.pdf", 
      "document_type": "pdf",      
  
    })
    file = open("/tmp/docraptor-python.pdf", "wb")
    file.write(create_response)
    file.close()
    print("Wrote PDF to /tmp/docraptor-python.pdf")
  
  except docraptor.rest.ApiException as error:
    print(error)
    print(error.message)
    print(error.code)
    print(error.response_body)
  </code></pre>
  
  <p>I am guessing there is some sort of HttpResponse missing?</p>
  
  <p>This seems like a great way to produce PDF files once I overcome this issue.  Their tech support is great but documentation a bit short.</p>
  
  <p>Thanks.</p>