[Chennaipy] Fwd: Help!!! Python/Django & WKHTMLTOPDF
Sunil Gupta
sunil at planmytour.in
Fri Jun 5 11:34:50 CEST 2015
Hi All,
We are facing the problem of creating the HTML to PDF in ubuntu.The package
wkhtmltopdf is working fine on windows but when we integrated my code onto
ubuntu its throwing errors. Any pointers would be a great help.
Traceback (most recent call last):
File "./apps/common/views.py", line 702, in get
pdf_content = response.rendered_content
File "/usr/local/lib/python2.7/dist-packages/wkhtmltopdf/views.py", line
148, in rendered_content
footer_filename=footer_filename)
File "/usr/local/lib/python2.7/dist-packages/wkhtmltopdf/views.py", line
107, in convert_to_pdf
return wkhtmltopdf(pages=[filename], **cmd_options)
File "/usr/local/lib/python2.7/dist-packages/wkhtmltopdf/utils.py", line
98, in wkhtmltopdf
return check_output(ck_args, **ck_kwargs)
File "/usr/lib/python2.7/subprocess.py", line 566, in check_output
process = Popen(stdout=PIPE, *popenargs, **kwargs)
File "/usr/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child
raise child_exception
*OSError: [Errno 8] Exec format error*
We installed django-wkhtmltopdf package, wkhtmltopdf executable
>From the command prompt when we try creating the file it works fine but in
django project its throwing error
root$wkhtmltopdf www.google.com output.pdf ----> works fine
Any idea what can be the issue with
Thanks
Sunil
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/chennaipy/attachments/20150605/424ecbf9/attachment-0001.html>
More information about the Chennaipy
mailing list