<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div>Hi All,<br><br></div>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.<br><div><div><br></div><div><div>Traceback (most recent call last):</div><div> File "./apps/common/views.py", line 702, in get</div><div> pdf_content = response.rendered_content</div><div> File "/usr/local/lib/python2.7/dist-packages/wkhtmltopdf/views.py", line 148, in rendered_content</div><div> footer_filename=footer_filename)</div><div> File "/usr/local/lib/python2.7/dist-packages/wkhtmltopdf/views.py", line 107, in convert_to_pdf</div><div> return wkhtmltopdf(pages=[filename], **cmd_options)</div><div> File "/usr/local/lib/python2.7/dist-packages/wkhtmltopdf/utils.py", line 98, in wkhtmltopdf</div><div> return check_output(ck_args, **ck_kwargs)</div><div> File "/usr/lib/python2.7/subprocess.py", line 566, in check_output</div><div> process = Popen(stdout=PIPE, *popenargs, **kwargs)</div><div> File "/usr/lib/python2.7/subprocess.py", line 710, in __init__</div><div> errread, errwrite)</div><div> File "/usr/lib/python2.7/subprocess.py", line 1327, in _execute_child</div><div> raise child_exception</div><div><b>OSError: [Errno 8] Exec format error</b></div></div><div><br></div><div>We installed django-wkhtmltopdf package, wkhtmltopdf executable</div><div><br></div><div>From the command prompt when we try creating the file it works fine but in django project its throwing error</div><div><br></div><div>root$wkhtmltopdf <a href="http://www.google.com" target="_blank">www.google.com</a> output.pdf ----> works fine</div><div><br></div><div>Any idea what can be the issue with</div><div><br></div><div>Thanks</div><span class="HOEnZb"><font color="#888888"><div>Sunil</div></font></span></div></div>
</div><br></div>