Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

4

wkhtmltopdf on V8 not found

By
Christian Parent
on 4/1/14, 5:47 PM 30,439 views

I have downloaded v0.12 from wkhtmltopdf site, extrated the file to usr/bin.

I have created a record

Settings > Configuration > Parameters > System Parameters name ‘webkit_path’ set the value to /usr/bin/wkhtmltopdf/ tried /usr/bin/wkhtmltopdf/bin/

still I am getting an error saying it is not found when I try to print a report.

Any ideas ?

This is the exact error message I am getting

Unable to find Wkhtmltopdf on this system. The report will be shown in html.

Still, I dont even get it in html.

Christian Parent
on 4/1/14, 5:50 PM
4
Craig Barnes
On 6/25/14, 8:26 AM

The steps that I found to work for me on debian wheezy are:

wget   http://downloads.sourceforge.net/project/wkhtmltopdf/0.12.1-dev/wkhtmltox-0.12.1-9615f00_linux-wheezy-amd64.deb
dpkg -i wkhtmltox-0.12.1-9615f00_linux-wheezy-amd64.deb

Then in /etc/init.d/openerp-server add  /usr/local/bin to the front of path environment variable, e.g.
PATH=/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin

Then restart openerp and all is well.

Thank you So much !

Hiren Vora - CEO at Emipro Technologies Pvt. Ltd. India
on 8/30/14, 2:15 AM
5
Ivo verlaek
On 6/21/14, 8:12 PM

Yes that did the trick for me:

Using Ubuntu 14.04:

  1. First install the one from the ubuntu library. The executable goes to /usr/bin.
  2. Then install the package from sourceforge with dpkg -i .deb filename. This will create (also) files in /usr/local/bin
  3. then just simply copy the file over the one in /usr/bin

I had to reboot to get it working. Probably a restart of the openerp-server also does the trick.

hey, i am getting this error while sending quotaion via email: 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 Do u know how to solve this?

Ruma Shakya
on 3/17/16, 3:15 AM
2
Christian Parent
On 4/1/14, 11:39 PM

I have manage to get it to work by doing the installation of wkhtmltopdf in ubuntu via apt-get install.

I was getting wrong version message so, I then copy the wkhtmltopdf file from the archive from wkhtmltopdf website and replaced the file that ubuntu installed in /usr/bin/.

It does work properly now. Dunno if I will get issues later on since I have not replaced the libs that comes in the archive.

Will keep updating this if any issue arise !

Hi Christian, I am facing a similar issue. Exactly which version of the wkhtmltopdf did you copy to the bin folder

Harold Poku
on 5/3/14, 6:24 AM

install wkhtmltopdf via ubuntu then, download the 0.12 version from wkhtmltopdf web site, open the archive and copy the file to the bin folder

Christian Parent
on 5/5/14, 3:16 PM

Hi Christian, I think you might find that there is no need to do an apt-get install of the older version of wkhtmltopdf. The 0.12 version being copied to /usr/bin should work, as I have it implemented in a script here (line #97): https://github.com/lukebranch/openerp-install-scripts/blob/master/odoo-saas4/ubuntu-14-04/odoo_install.sh . You may find you get conflicts down the road once the version you have installed with apt gets updated to the 0.12 version.

Luke Branch
on 7/16/14, 10:53 PM
1
Jonathan Juhasz
On 10/30/14, 2:35 PM

I made it work on Windows.

You have to follow this thread: https://www.odoo.com/fr_FR/forum/help-1/question/how-tu-print-a-pdf-with-qweb-wkhtmltopdf-v8-on-windows-tutorial-64326
The most important, do not confuse Environnement variables and System variables

We need do add the wkhtmltopdf path into Path System Variable and NOT in Environnement variables.
Do not forget to restart odoo server after this !

Thanks !

0
Landis Arnold
On 4/16/15, 6:43 PM

Using Turnkey Linux Postresql - Debian Wheezy-  got Sales Orders and Invoices to Work with the following using SSH - no navigation from login, just run after login----This was after being unable to generate a PDF of SO or Invoice without errors previously------

apt-get install xfonts-base

wget http://sourceforge.net/projects/wkhtmltopdf/files/0.12.2.1/wkhtmltox-0.12.2.1_linux-wheezy-amd64.deb 

dpkg -i wkhtmltox-0.12.2.1_linux-wheezy-amd64.deb

apt-get -f install

(Then Started Openerp Server) Odoo

0
Istvan Steve Novak
On 9/20/14, 4:53 PM

THREE months past since this last question or request for an answer and no one replied from Odoo.... I am in the same trouble, installed Odoo v8 on Windows 8.1 Pro and cannot create any doc in pdf (nor in html) due to the same missing app (in spite of that I installed it manually. 

0
Mathieu Laflamme
On 6/12/14, 1:02 PM

Anyone made it work on Windows? Where should I bind the binary...I put it in "PATH" variable... still no luck...

It gives me the same error and it loads in HTML.

I will eventually move to Linux... but Windows should work too right?

Thanks

I made it work on Windows. You have to follow this thread: https://www.odoo.com/fr_FR/forum/help-1/question/how-tu-print-a-pdf-with-qweb-wkhtmltopdf-v8-on-windows-tutorial-64326 The most important, do not confuse Environnement variables and System variables We need do add the wkhtmltopdf path into Path System Variable and NOT in Environnement variables. Do not forget to restart odoo server after this ! Thanks !

Jonathan Juhasz
on 10/30/14, 2:35 PM
0
Jean Marc Le Goff
On 9/24/14, 12:41 PM

thank you Craig Barnes, it was the good way for me

0

Ben Bernard

--Ben Bernard--
1083
| 4 3 6
Jakarta, Indonesia
--Ben Bernard--
Ben Bernard
On 9/21/14, 8:11 AM

I think I should make it clear that the OP problem is that he is inserting the directory path of wkhtmltopdf to the webkit_path option. The correct value is the path to wkhtmltopdf executable. Below is the example of the setting, depends on your installation path.

linux: webkit_path = /usr/local/bin/wkhtmltopdf

windows: webkit_path = c:\program files\wkhtmltopdf\wkhtmltopdf.exe

 

Other option is not to use webkit_path. It can be done if you put wkhtmltopdf executable in environment PATH or the same directory as openerp-server script. I think the webkit_path option is more secure and easier to maintain, because it determine specifically what odoo can execute.

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

4 follower(s)

Stats

Asked: 4/1/14, 5:47 PM
Seen: 30439 times
Last updated: 7/22/15, 3:26 AM