Printing pdf in bitnami stack

I have the following error when i want to print a PDF in bitnami stack, first it showed me an error that it doesn’t have wkhtmltopdf installed, i donwloaded and installed the version of wkhtml that my erpnext needed, now it show me this:
Traceback (innermost last):
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/”, line 63, in application
response = frappe.api.handle()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/”, line 50, in handle
return frappe.handler.handle()
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/”, line 20, in handle
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/”, line 37, in execute_cmd
ret =, **frappe.form_dict)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/”, line 801, in call
return fn(*args, **newargs)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/templates/pages/”, line 150, in download_pdf
frappe.local.response.filecontent = get_pdf(html)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/apps/frappe/frappe/utils/”, line 16, in get_pdf
pdfkit.from_string(html, fname, options=options or {})
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pdfkit/”, line 68, in from_string
return r.to_pdf(output_path)
File “/opt/bitnami/apps/erpnext/htdocs/frappe-bench/env/lib/python2.7/site-packages/pdfkit/”, line 119, 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:
–no-outline specified in incorrect location

wkhtmltopdf 0.12.1 (with patched qt)

wkhtmltopdf [GLOBAL OPTION]… [OBJECT]…

Document objects:
wkhtmltopdf is able to put several objects into the output file, an object is
either a single webpage, a cover webpage or a table of content. The objects
are put into the output document in the order they are specified on the
command line, options can be specified on a per object basis or in the global
options area. Options from the Global Options section can only be placed in
the global options area

A page objects puts the content of a singe webpage into the output document.

(page)? (here comes an input textbox) [PAGE OPTION]…
Options for the page object can be placed in the global options and the page
options areas. The applicable options can be found in the Page Options and
Headers And Footer Options sections.

A cover objects puts the content of a singe webpage into the output document,
the page does not appear in the table of content, and does not have headers
and footers.

cover (here comes an input textbox) [PAGE OPTION]…
All options that can be specified for a page object can also be specified for
a cover.

A table of content object inserts a table of content into the output document.

All options that can be specified for a page object can also be specified for
a toc, further more the options from the TOC Options section can also be
applied. The table of content is generated via XSLT which means that it can be
styled to look however you want it to look. To get an aide of how to do this
you can dump the default xslt document by supplying the
–dump-default-toc-xsl, and the outline it works on by supplying
–dump-outline, see the Outline Options section.

Converts one or more HTML pages into a PDF document, using wkhtmltopdf patched

Global Options:
–collate Collate when printing multiple copies (default)
–no-collate Do not collate when printing multiple copies
–copies Number of copies to print into the pdf file (default 1)
-H, --extended-help Display more extensive help, detailing less common command switches
-g, --grayscale PDF will be generated in grayscale
-h, --help Display help
–license Output license information and exit
-l, --lowquality Generates lower quality pdf/ps. Useful to shrink the result document space
-O, --orientation Set orientation to Landscape or Portrait (default Portrait)
-s, --page-size Set paper size to: A4, Letter, etc. (default A4)
-q, --quiet Be less verbose (default)
–read-args-from-stdin Read command line arguments from stdin
–title The title of the generated pdf file (The title of the first document is used if not specified)
-V, --version Output version information and exit
Page Options:
–print-media-type Use print media-type instead of screen
–no-print-media-type Do not use print media-type instead of screen (default)
If you experience bugs or want to request new features please visit

In adittion to this, i tested wkhtmltopdf executing:

wkhtmltopdf erpnext.pdf

It printed the PDF correctly

Anyone can help me with this?