This question has been flagged
6 Replies
12401 Views

Hello everyone ! 


I have a big problem printing in PDF my reports ( invoices, bills, due payments ... ) I am getting a plain text  No header, no footer, no logo.

I did reinstall WKHTMLTOPDF , but still having the same bug.

I need Help please!

Avatar
Discard
Best Answer

Please check the following links, that solved the same issue for me:

http://odoo.guide/missing-headers-footers-and-css-layout-in-reports/ 

http://odoo.guide/update-wkhtmltopdf/ 

Avatar
Discard
Best Answer

The links in the accepted answer seem to no longer work. Adding my own findings here for anyone that runs into this issue:

  • The directory where wkhtmltopdf is located must be in the path environment variable

    • During startup, Odoo logs the location of the wkhtmltopdf copy it is using, so check that.

  • On windows, I had this issue and was able to resolve by setting the temp environment variable to something short (like c:\tmp) instead of the default %LOCALAPPDATA%\Temp

  • The report.url Odoo setting must be set correctly to access your Odoo instance from the server itself. http://127.0.0.1:8069 should usually work. Background: wkthmltopdf uses this URL to download stylesheets. Depending on your deployment, it could be that the URL used to access Odoo publicly does not resolve correctly on the machine itself. In that case setting this is important.


Avatar
Discard
Author Best Answer

Hi again,

Thanks for everyone's help, but

I did try all the options you mentioned, but still have the same bug/ I am running on Debian 8 / I copied the same database and uploaded it into to different servers , it's printing good on one , but not on the other one . I did the same steps ,

Avatar
Discard

You did the above steps in all those servers?

Best Answer

I guess that wkhtmltopdf, even if reinstalled, is still: in wrong version, or wrongly reinstalled; be aware that it has to be in 0.12.1 version at least, while apt-get (or similar) works with repos where latest is .11.; after proper setup also binary is to be copied in other location (not sure if it is necessary, but I am blindly following this rule).

If you could share your system details (os, odoo version) as well as action you did meaning' reinstalling' would be easier to help.


regards

Tomasz

Avatar
Discard
Best Answer

Hey, Try this if you are using ubuntu

Install this (if you are using ubuntu) File

* Download file

sudo dpkg -i wkhtmltox-0.12.1_linux-trusty-amd64.deb

sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
sudo cp /usr/local/bin/wkhtmltoimage /usr/bin

Find correct file for other OS from Here
and install.


Hope this helps.

Avatar
Discard