I was getting 504 Gateway Time-out when trying to generate pdf … so i checked to see that wkhtmltopdf was not install so i did an apt-get install wkhtmltopdf now i get
root@erp-2:~# apt-get install wkhtmltopdf
Server Error
Traceback (innermost last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 60, in application
response = frappe.api.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/api.py", line 50, in handle
return frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 19, in handle
execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 36, in execute_cmd
ret = frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 806, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/templates/pages/print.py", line 182, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/pdf.py", line 16, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File "/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/api.py", line 68, in from_string
return r.to_pdf(output_path)
File "/home/frappe/frappe-bench/env/src/pdfkit/pdfkit/pdfkit.py", line 143, in to_pdf
raise IOError("wkhtmltopdf exited with non-zero code {0}. error:\n{1}".format(exit_code, stderr.decode("utf-8")))
IOError: wkhtmltopdf exited with non-zero code 1. error:
Unknown long argument --no-outline
Name:
wkhtmltopdf 0.9.9
Synopsis:
wkhtmltopdf [OPTIONS]... [More input files]
Description:
Converts one or more HTML pages into a PDF document, *not* using wkhtmltopdf
patched qt.
General Options:
--collate Collate when printing multiple copies
--copies Number of copies to print into the pdf file (default 1)
--extended-help Display more extensive help, detailing less common command switches
-h, --help Display help
-O, --orientation Set orientation to Landscape or Portrait
-s, --page-size Set paper size to: A4, Letter, etc.
--password HTTP Authentication password
-p, --proxy Use a proxy
-q, --quiet Be less verbose
--username HTTP Authentication username
-V, --version Output version information an exit
Reduced Functionality:
This version of wkhtmltopdf has been compiled against a version of QT without
the wkhtmltopdf patches. Therefore some features are missing, if you need
these features please use the static version.
Currently the list of features only supported with patch QT includes:
* Printing more then one HTML document into a PDF file.
* Running without an X11 server.
* Adding a document outline to the PDF file.
* Adding headers and footers to the PDF file.
* Generating a table of contents.
* Adding links in the generated PDF file.
* Printing using the screen media-type.
* Disabling the smart shrink feature of webkit.
Contact:
If you experience bugs or want to request new features please visit
, if you have any problems
or comments please feel free to contact me: see