title: Django-wkhtmltopdf returned non-zero exit status 1
body: <p>I'm receiving the following error using <code>wkhtmltopdf</code> in a Django project in development.  If I try and run it using an Apache server the status code returned is 6 rather than 1.</p>
  
  <blockquote>
    <p>Command '['wkhtmltopdf', '--disable-javascript', '--encoding',
    u'utf8', '--quiet', u'False', '/tmp/wkhtmltopdfnUwu3t.html', '-']'
    returned non-zero exit status 1</p>
  </blockquote>
  
  <p>This is my view.</p>
  
  <pre><code>class MyPDF(OrgOwnerMixin, PDFTemplateView):
      filename = 'my_pdf.pdf'
      template_name = 'pdf/test.html'
  
      def get_object(self, *args, **kwargs):
          return Organisation.objects.get(slug=self.kwargs['slug'])
  
      def get_context_data(self, *args, **kwargs):
          ctx = super(MyPDF, self).get_context_data(*args, **kwargs)
          ctx['object'] = self.get_object()
          return ctx
  </code></pre>
  
  <p>And here is the Traceback:</p>
  
  <p>Traceback:</p>
  
  <pre><code>File "/home/henry/Documents/Sites/Development/fargus/env/local/lib/python2.7/site-packages/django/core/handlers/exception.py" in inner
    41.             response = get_response(request)
  
  File "/home/henry/Documents/Sites/Development/fargus/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
    217.                 response = self.process_exception_by_middleware(e, request)
  
  File "/home/henry/Documents/Sites/Development/fargus/env/local/lib/python2.7/site-packages/django/core/handlers/base.py" in _get_response
    215.                 response = response.render()
  
  File "/home/henry/Documents/Sites/Development/fargus/env/local/lib/python2.7/site-packages/django/template/response.py" in render
    107.             self.content = self.rendered_content
  
  File "/home/henry/Documents/Sites/Development/fargus/env/local/lib/python2.7/site-packages/wkhtmltopdf/views.py" in rendered_content
    78.             cmd_options=cmd_options
  
  File "/home/henry/Documents/Sites/Development/fargus/env/local/lib/python2.7/site-packages/wkhtmltopdf/utils.py" in render_pdf_from_template
    186.                           cmd_options=cmd_options)
  
  File "/home/henry/Documents/Sites/Development/fargus/env/local/lib/python2.7/site-packages/wkhtmltopdf/utils.py" in convert_to_pdf
    124.     return wkhtmltopdf(pages=filename, **cmd_options)
  
  File "/home/henry/Documents/Sites/Development/fargus/env/local/lib/python2.7/site-packages/wkhtmltopdf/utils.py" in wkhtmltopdf
    110.     return check_output(ck_args, **ck_kwargs)
  
  File "/usr/lib/python2.7/subprocess.py" in check_output
    574.         raise CalledProcessError(retcode, cmd, output=output)
  
  Exception Type: CalledProcessError at /pdf/org-1/
  Exception Value: Command '['wkhtmltopdf', '--disable-javascript', '--encoding', u'utf8', '--quiet', u'False', '/tmp/wkhtmltopdfEG5K8j.html', '-']' returned non-zero exit status 1
  </code></pre>
  
  <p>Any help will be much appreciated</p>