I’ve tried to install wkhtmltopdf, so i would be able to send sales orders etc in pdf’s.
However im facing some troubles.
If i use wkhtmltopdf straight from as a cli command it works, but when trying from erpnext i face the following error.
can someone help me out?
</div>
<pre>Traceback (innermost last):
File “/home/ulrik/frappe-bench/apps/frappe/frappe/app.py”, line 52, in application
response = frappe.api.handle()
File “/home/ulrik/frappe-bench/apps/frappe/frappe/api.py”, line 42, in handle
return frappe.handler.handle()
File “/home/ulrik/frappe-bench/apps/frappe/frappe/handler.py”, line 66, in handle
execute_cmd(cmd)
File “/home/ulrik/frappe-bench/apps/frappe/frappe/handler.py”, line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/ulrik/frappe-bench/apps/frappe/frappe/init.py”, line 526, in call
return fn(*args, **newargs)
File “/home/ulrik/frappe-bench/apps/frappe/frappe/templates/pages/print.py”, line 93, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File “/home/ulrik/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 28, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/ulrik/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/ulrik/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py”, line 131, in to_pdf
’ '.join(args))
IOError: Command failed: /usr/bin/wkhtmltopdf --margin-top 15mm --margin-right 15mm --page-size A4 --encoding UTF-8 --background --print-media-type --images --margin-left 15mm --no-outline --margin-bottom 15mm - /tmp/d7186958919ad48ba14b96722d0f2378c8dbff211862a8dc3689cf5a.pdf
Check whhtmltopdf output without ‘quiet’ option
–
Note:
If you are posting an issue,
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
Installing wkhtmltopdf using apt-get is outdated and does not support everything that frappe needs. I think you should download a .deb from their website and manually install it. On Friday, 15 August 2014 12:33:53 UTC+1, Ulrik Tuemand wrote:
Hey Guys,
I've tried to install wkhtmltopdf, so i would be able to send sales orders etc in pdf's.
However im facing some troubles.
If i use wkhtmltopdf straight from as a cli command it works, but when trying from erpnext i face the following error.
can someone help me out?
</div>
<pre>Traceback (innermost last):
File “/home/ulrik/frappe-bench/apps/frappe/frappe/app.py”, line 52, in application
response = frappe.api.handle()
File “/home/ulrik/frappe-bench/apps/frappe/frappe/api.py”, line 42, in handle
return frappe.handler.handle()
File “/home/ulrik/frappe-bench/apps/frappe/frappe/handler.py”, line 66, in handle
execute_cmd(cmd)
File “/home/ulrik/frappe-bench/apps/frappe/frappe/handler.py”, line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File “/home/ulrik/frappe-bench/apps/frappe/frappe/init.py”, line 526, in call
return fn(*args, **newargs)
File “/home/ulrik/frappe-bench/apps/frappe/frappe/templates/pages/print.py”, line 93, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File “/home/ulrik/frappe-bench/apps/frappe/frappe/utils/pdf.py”, line 28, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/home/ulrik/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py”, line 68, in from_string
return r.to_pdf(output_path)
File “/home/ulrik/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py”, line 131, in to_pdf
’ '.join(args))
IOError: Command failed: /usr/bin/wkhtmltopdf --margin-top 15mm --margin-right 15mm --page-size A4 --encoding UTF-8 --background --print-media-type --images --margin-left 15mm --no-outline --margin-bottom 15mm - /tmp/d7186958919ad48ba14b96722d0f2378c8dbff211862a8dc3689cf5a.pdf
Check whhtmltopdf output without ‘quiet’ option
–
Note:
If you are posting an issue,
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
@Pratik. Debian/Ubuntu has missing wkhtmltopdf installation in setup_frappe.sh.
-Anand.
On Sat, Aug 16, 2014 at 11:34 PM, Dhaifallah Alwadani <da…@gmail.com> wrote:
Just to add my experience.
Installing wkhtmltopdf using apt-get is outdated and does not support everything that frappe needs. I think you should download a .deb from their website and manually install it.
On Friday, 15 August 2014 12:33:53 UTC+1, Ulrik Tuemand wrote:
Hey Guys,
I've tried to install wkhtmltopdf, so i would be able to send sales orders etc in pdf's.
However im facing some troubles.
If i use wkhtmltopdf straight from as a cli command it works, but when trying from erpnext i face the following error.
can someone help me out?
</div>
<pre>Traceback (innermost last):
File "/home/ulrik/frappe-bench/apps/frappe/frappe/app.py", line 52, in application
response = frappe.api.handle()
File "/home/ulrik/frappe-bench/apps/frappe/frappe/api.py", line 42, in handle
return frappe.handler.handle()
File "/home/ulrik/frappe-bench/apps/frappe/frappe/handler.py", line 66, in handle
execute_cmd(cmd)
File "/home/ulrik/frappe-bench/apps/frappe/frappe/handler.py", line 89, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/ulrik/frappe-bench/apps/frappe/frappe/init.py", line 526, in call
return fn(*args, **newargs)
File "/home/ulrik/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 93, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File "/home/ulrik/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 28, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File "/home/ulrik/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/api.py", line 68, in from_string
return r.to_pdf(output_path)
File "/home/ulrik/frappe-bench/env/local/lib/python2.7/site-packages/pdfkit/pdfkit.py", line 131, in to_pdf
' '.join(args))
IOError: Command failed: /usr/bin/wkhtmltopdf --margin-top 15mm --margin-right 15mm --page-size A4 --encoding UTF-8 --background --print-media-type --images --margin-left 15mm --no-outline --margin-bottom 15mm - /tmp/d7186958919ad48ba14b96722d0f2378c8dbff211862a8dc3689cf5a.pdf
Check whhtmltopdf output without 'quiet' option
–
Note:
If you are posting an issue,
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
ERPNext is a free and open source software and support is given on this forum by a team (https://frappe.io/webnotes). So please consider donating if you find this forum useful (https://frappe.io/buy). Even a small amount would be helpful.
We should be able to replicate it at our end. So please give us as much information as you can. Please see it from the point of view of the person receiving the communication.
For sending images, use http://imgur.com or other similar services. Do not send images as attachments. Links are good. Same goes for any file you are going to send.
End of Note
—
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.