Skip to Content
Menu
This question has been flagged
2 Replies
9609 Views

I've tried multiple versions of wkhtmltopdf and also configured the report.url to the address of our odoo onlineshop and the webkit_path is set to /usr/bin/wkhtmltopdf

The pdf report is showing only the text with the footer, but without the header. Everything aligned to the left side and no colors. So it seems the css is not integrated. How could I investigate furthur? Where might be my problem?

Avatar
Discard

Hi Terdiadev,


Usually this has to be doing with the Wkhtmltopdf version. The best is to use version 0.12.1 (as you can read here: https://github.com/odoo/odoo/issues/5177 )
If this is not the problem then have a look at Settings > Technical > Parameters > System parameters and make sure that the parameter 'web.base.url' contains the value 0.0.0.0:8069 or localhost:8069 or 127.0.0.1:8069. If this is not the case change it and create a new parameter.
Give the parameter the name 'web.base.url.freeze' and under value fill in 'True'.

Either one of those two will fix your problem.
Yenthe

Author Best Answer

Hi Yenthe,

thanks for your good summary of what should be done!

With your help I got it to work! I'll explain my solution for others:

First I removed my other wkhtmltox with 'apt-get remove --purge wkhtmltox'

Then 'cd ~/tmp' and got me the 0.12.1 wkthmltopdf with 'wget http://download.gna.org/wkhtmltopdf/0.12/0.12.1/wkhtmltox-0.12.1_linux-trusty-amd64.deb'

I installed it with 'dpkg -i  wkhtmltox-0.12.1_linux-trusty-amd64.deb' and then copied the files to /usr/bin/ with

'cd /usr/locale/bin/'

'mv wkhtmltoimage /usr/bin'

'mv wkhtmltopdf /usr/bin'

I verified the version with 'cd -' and 'wkhtmltopdf --version'

Then I restarted odoo and went as Yenthe explained to  Settings > Technical > Parameters > System parameters and changed the web.base.url parameter to http://mywebsitewithodoo.com:8069

I figured that I did not need to set web.base.url.freeze to True

Thanks a lot!

Avatar
Discard
Related Posts Replies Views Activity
7
Mar 22
54760
1
Apr 23
926
1
Feb 23
8976
2
May 21
2405
1
Jun 20
2380