Page 1 of 1

[SOLVED] wkhtmltox in mageia6

PostPosted: Jan 9th, '19, 11:29
by bitit
good morning, how can install wkhtmltox in mageia6?

Thank you
Enrico

Re: wkhtmltox in mageia6

PostPosted: Jan 9th, '19, 18:27
by bitit
ok, i have done
Code: Select all
npm install wkhtmltopdf
npm install wkhtmltox


but when i do a print test in odoo , odoo reply that don't find wkhtmltopdf; but in /usr/lib/node-modules i can see the module installed

what i have miss?
Enrico

Re: wkhtmltox in mageia6

PostPosted: Jan 11th, '19, 02:15
by doktor5000
That module is only a node.js wrapper for the actual wkhtmltopdf binary. Did you install that, too ?
https://wkhtmltopdf.org/downloads.html

Re: wkhtmltox in mageia6

PostPosted: Jan 11th, '19, 16:26
by bitit
yes, i have try but odoo give me this error

Code: Select all
Traceback (most recent call last):
  File "/usr/lib/python2.7/site-packages/odoo/addons/report/controllers/main.py", line 96, in report_download
    response = self.report_routes(reportname, docids=docids, converter='pdf')
  File "/usr/lib/python2.7/site-packages/odoo/http.py", line 504, in response_wrap
    response = f(*args, **kw)
  File "/usr/lib/python2.7/site-packages/odoo/addons/report/controllers/main.py", line 45, in report_routes
    pdf = report_obj.with_context(context).get_pdf(docids, reportname, data=data)
  File "/usr/lib/python2.7/site-packages/odoo/addons/report/models/report.py", line 192, in get_pdf
    save_in_attachment = self._check_attachment_use(docids, report)
  File "/usr/lib/python2.7/site-packages/odoo/addons/report/models/report.py", line 326, in _check_attachment_use
    pdf = base64.decodestring(pdf)
  File "/usr/lib64/python2.7/base64.py", line 328, in decodestring
    return binascii.a2b_base64(s)
TypeError: a2b_base64() argument 1 must be string or buffer, not None

Re: wkhtmltox in mageia6

PostPosted: Jan 11th, '19, 16:41
by bitit
ok solved ..

https://github.com/odoo/odoo/issues/15969


Downloaded the new wkhtmltopdf.
Extracted . (tar xf wkhtmltox-0.12.4_linux-generic-amd64.tar.xz)
Backup old one. ( mv /bin/wkhtmltopdf /bin/wkhtmltopdf_old) Or /usr/bin/
Copy the new file. (cp wkhtmltox/bin/wkhtmltopdf /bin/)

>>>> Delete the current invoice/quote and create a new one and try.<<<<

whit new invoice, work.

Thank you
Enrico