Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
16 Odpowiedzi
47437 Widoki

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 ?

Awatar
Odrzuć
Autor

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.

Najlepsza odpowiedź

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć

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?

Autor Najlepsza odpowiedź

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 !

Awatar
Odrzuć

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

Autor

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

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.

Najlepsza odpowiedź

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 !

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć

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 !

Najlepsza odpowiedź

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. 

Awatar
Odrzuć
Najlepsza odpowiedź

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.

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
5
cze 17
9032
5
lis 16
6883
0
sie 16
5120
2
cze 16
3865
4
sty 24
16571