Bantuan

1

Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt (error when sending mail)

Avatar
Ruma Shakya

When i try to send quotaton by email, the following odoo warning pops up:
Report (PDF)Wkhtmltopdf failed (error code: -6). Message: The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display 
 Does anyone have the solution to this? 

3 Komentar
Avatar
Abaikan
Avatar
Ray Carnes
-

Which version of WKHTML2PDF are you using?

Avatar
Ruma Shakya
-

wkhtmltopdf 0.12.2.4-1

Avatar
Ruma Shakya
-

So, nobody got an answer to this? Sad...

4 Semua Jawaban
4
Avatar
Khamid
Best Answer

Hello.


I have found the easy solution and created github gist:

https://gist.github.com/faniska/37f896d5e9de5fee925925d7caf3cb9e

and bitbucket snippet

https://bitbucket.org/snippets/FanisTGT/neM5nA


I will be glad if it is helpful

2 Komentar
Avatar
Abaikan
Avatar
aashfaque
-

It works for me thanks.

Avatar
Cameron
-

Happy bunny here to :) Cheers

1
Best Answer

I have fixed problem. Try this:

sudo apt install ttf-mscorefonts-installer

sudo fc-cache -f -v

Avatar
Abaikan
0
Avatar
Hervé
Best Answer

It was painfull but I found the solution : it depends on your linux version and probably also of your odoo version.

So, my solution is for debian 10 (buster) and Odoo v12 :
1) need to have wkhtmltopdf version 0.12.5 or higher otherwize there is a compatibility mess around ssl libraries and I get the warning : "QSslSocket: cannot resolve SSLv3_client_method"
2) need to have a wkhtmltopdf version "patched with qt" otherwize I got a warning in odoo "The switch --header-spacing, is not support using unpatched qt, ..." and headers and footers of the pdf are blanks !

after that, the link provided by @Gunther Kohn gives you the solution

Avatar
Abaikan
0
Avatar
Gunther Kohn
Best Answer

I have the same problem. Try this solution: https://gist.github.com/tejastank/45b6eba13fb38e24110218e3ce50129b

You need some time (and coffee) but after that everything works well.

Avatar
Abaikan