Skip to Content
Odoo Menú
  • Registra entrada
  • Prova-ho gratis
  • Aplicacions
    Finances
    • Comptabilitat
    • Facturació
    • Despeses
    • Full de càlcul (IA)
    • Documents
    • Signatura
    Vendes
    • CRM
    • Vendes
    • Punt de venda per a botigues
    • Punt de venda per a restaurants
    • Subscripcions
    • Lloguer
    Imatges de llocs web
    • Creació de llocs web
    • Comerç electrònic
    • Blog
    • Fòrum
    • Xat en directe
    • Aprenentatge en línia
    Cadena de subministrament
    • Inventari
    • Fabricació
    • PLM
    • Compres
    • Manteniment
    • Qualitat
    Recursos humans
    • Empleats
    • Reclutament
    • Absències
    • Avaluacions
    • Recomanacions
    • Flota
    Màrqueting
    • Màrqueting Social
    • Màrqueting per correu electrònic
    • Màrqueting per SMS
    • Esdeveniments
    • Automatització del màrqueting
    • Enquestes
    Serveis
    • Projectes
    • Fulls d'hores
    • Servei de camp
    • Suport
    • Planificació
    • Cites
    Productivitat
    • Converses
    • Validacions
    • IoT
    • VoIP
    • Coneixements
    • WhatsApp
    Aplicacions de tercers Odoo Studio Plataforma d'Odoo al núvol
  • Sectors
    Comerç al detall
    • Llibreria
    • Botiga de roba
    • Botiga de mobles
    • Botiga d'ultramarins
    • Ferreteria
    • Botiga de joguines
    Food & Hospitality
    • Bar i pub
    • Restaurant
    • Menjar ràpid
    • Guest House
    • Distribuïdor de begudes
    • Hotel
    Real Estate
    • Real Estate Agency
    • Estudi d'arquitectura
    • Construcció
    • Gestió immobiliària
    • Jardineria
    • Associació de propietaris de béns immobles
    Consulting
    • Accounting Firm
    • Partner d'Odoo
    • Agència de màrqueting
    • Bufet d'advocats
    • Captació de talent
    • Auditoria i certificació
    Fabricació
    • Textile
    • Metal
    • Furnitures
    • Food
    • Brewery
    • Regals corporatius
    Salut i fitness
    • Club d'esport
    • Òptica
    • Centre de fitness
    • Especialistes en benestar
    • Farmàcia
    • Perruqueria
    Trades
    • Servei de manteniment
    • Hardware i suport informàtic
    • Solar Energy Systems
    • Shoe Maker
    • Serveis de neteja
    • HVAC Services
    Others
    • Nonprofit Organization
    • Agència del medi ambient
    • Lloguer de panells publicitaris
    • Fotografia
    • Lloguer de bicicletes
    • Distribuïdors de programari
    Browse all Industries
  • Comunitat
    Aprèn
    • Tutorials
    • Documentació
    • Certificacions
    • Formació
    • Blog
    • Pòdcast
    Potenciar l'educació
    • Programa educatiu
    • Scale-Up! El joc empresarial
    • Visita Odoo
    Obtindre el programari
    • Descarregar
    • Comparar edicions
    • Novetats de les versions
    Col·laborar
    • GitHub
    • Fòrum
    • Esdeveniments
    • Traduccions
    • Converteix-te en partner
    • Services for Partners
    • Registra la teva empresa comptable
    Obtindre els serveis
    • Troba un partner
    • Troba un comptable
    • Contacta amb un expert
    • Serveis d'implementació
    • Referències del client
    • Suport
    • Actualitzacions
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Programar una demo
  • Preus
  • Ajuda

Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:

  • CRM
  • e-Commerce
  • Comptabilitat
  • Inventari
  • PoS
  • Projectes
  • MRP
All apps
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
You need to be registered to interact with the community.
All Posts People Badges
Etiquetes (View all)
odoo accounting v14 pos v15
About this forum
Ajuda

Header and footer not showing in PDF

Subscriure's

Get notified when there's activity on this post

This question has been flagged
pdfinvoicev14
11 Respostes
33929 Vistes
Avatar
Fernanda P

Hello! I am using 14.0 CE and I have a problem with the invoice PDF, the header and the footer with the company info are not showing, I searched and found that could be a problem with the wkhtmltopdf version but I installed multiple versions and still not working, also I search the document template and the template has the header and footer, I don't know why the PDF don't show the header and footer. 

Thanks for the help!

1
Avatar
Descartar
Avatar
ORLANDO M GUZMAN
Best Answer

SOLUTION TO HAVE PRINT HEADERS:

I had the same issue, and I was able to resolve it by following shaneebkhan's steps but in this way

The steps are as follows (ChatGPT assisted us with this):

  1. Install wkhtmltopdf on Ubuntu 22: To install wkhtmltopdf on Ubuntu 22, open a terminal and execute the following command:

    sudo apt install wkhtmltopdf
    
  2. Check the current version of wkhtmltopdf: After installation, verify the current version of wkhtmltopdf with the following command:

    wkhtmltopdf --version
    

    If the version is 0.12.6, you will need to remove it and download version 0.12.5.

  3. Uninstall version 0.12.6: Open a terminal and execute the following command to uninstall the current version of wkhtmltopdf (0.12.6):

    sudo apt remove wkhtmltopdf
    

    Then, if you wish, you can remove unused dependencies with the command:

    sudo apt autoremove
    
  4. Download and install version 0.12.5: Download the deb package of wkhtmltopdf version 0.12.5 with the following command (make sure to copy the entire command):

    wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
    

    Next, install the downloaded package along with the required fonts:

    sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb
    sudo apt-get install xfonts-75dpi
    sudo apt-get update
    
  5. Fix broken packages (if necessary): If, after following the previous steps, you encounter broken packages, you can try to fix them with the following command:

    sudo apt --fix-broken install
    

Once you have followed these steps, verify the wkhtmltopdf version again to confirm that you are now using version 0.12.5 with the following command:

wkhtmltopdf --version

It should display version 0.12.5 if everything went well.

I hope this guide helps you resolve the wkhtmltopdf installation issues and generate reports correctly in Odoo 16. Good luck!

AS A RECOMMENDATION, some cases may require the installation of libssl1.1 to address additional issues. You can try downloading and installing it with the following commands:

wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1-1ubuntu2.1~18.04.22_amd64.deb
sudo dpkg -i libssl1.1_1.1.1-1ubuntu2.1~18.04.22_amd64.deb


10
Avatar
Descartar
Jaime Pedraza

I had to validate the version directly on the /usr/local/bin folder, but it worked!

Avatar
Bernard Wilmus
Best Answer

Hi,

The solution of adding key/value in the system parameters solves a different issue: your report prints without any formating (CSS).

If your reports print without the header and the footer, check the log (error_level = debug). You will certainly view such messages:

WARNING databasename odoo.addons.base.models.ir_actions_report: wkhtmltopdf: b"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.QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-odoo16'\n"

To solve the problem you have to patch your wkhtml2pdf

Type this command to get the current version

# wkhtmltopdf --version
wkhtmltopdf 0.12.5

After patching your library, you will get the following response

# wkhtmltopdf --version
wkhtmltopdf 0.12.5 (with patched qt)

This will solve the problem.





1
Avatar
Descartar
Avatar
shaneebkhan
Best Answer

hi, 

hear the problem was installation of wkhtmltopdf 

i have same issue in odoo 16 finally i corrected by proper installation of wkhtmltopdf

first we have to install wkhtmltopdf ubuntu 22 terminal

      1.    apt install wkhtmltopdf

      2. wkhtmltopdf --version 

      whether its 0.12.6 remove and download 0.12.5

      3.wget https://github\\.com/wkhtmltopdf/wkhtmltopdf/releases/download/0\\.12\\.5/wkhtmltox_0\\.12\\.5\\-1\\.bionic_amd64\\.deb

     \\ 4\\.sudo\\ dpkg\\ \\-i\\ \\ wkhtmltox_0\\.12\\.5\\-1\\.bionic_amd64\\.deb

sometimes\\ it\\ may\\ error\\ then\\ try\\ to\\ install\\ one\\ or\\ two\\ things 

    \\ 1\\.wget\\ http://archive\\.ubuntu\\.com/ubuntu/pool/main/o/openssl/libssl1\\.1_1\\.1\\.1\\-1ubuntu2\\.1\\~18\\.04\\.22_amd64\\.deb

   \\ 2\\.sudo\\ dpkg\\ \\-i\\ libssl1.1_1.1.1-1ubuntu2.1~18.04.22_amd64.deb

    3.sudo apt-get install xfonts-75dpi

    4.sudo apt-get update

    5.apt --fix-broken install


finally confirm  the "wkhtmltopdf version is  0.12.5"

1
Avatar
Descartar
Avatar
jaydeep chaudhari
Best Answer

https://chatgpt.com/share/66e43fe4-d920-8003-a3e9-8b804f177c9a   try this i faced all error solve in this gpt

0
Avatar
Descartar
Avatar
Munjata KEITA
Best Answer

I had the same issue with Odoo 16 on Ubuntu 22.04 (arm64). 

I directly download the qt-patched version 0.12.6.1-2 on https://wkhtmltopdf.org/downloads.html


0
Avatar
Descartar
Avatar
valentierr@tuta.io
Best Answer

Wkhtmltopdf version 0.12.5 is not available for Ubuntu 22 arm64. Any hints to have headers and footers back for this architecture?

0
Avatar
Descartar
Munjata KEITA

Yes indeed, I had the same issue with arm64.
You can download it directly on https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-2/wkhtmltox_0.12.6.1-2.jammy_arm64.deb

Avatar
Tom Kaiser
Best Answer

Has anyone managed to get this working correctly?

I've tried setting the parameter.

All versions of wkhtmltopdf 0.12.6, 0.12.5, 0.12.5 (with patched qt).

All headers are being forwarded as well.

0
Avatar
Descartar
Avatar
Trịnh Văn Quang
Best Answer

I had the same issue when generating PDF reports for customers. I tried downgrading wkhtmltopdf to version 0.12.5, but it didn't work. 

However, I found the solution to fix it for both versions 0.12.6 and 0.12.5.


My solution was to update the system's proxy. 
Always redirect to HTTPS if you're using HTTPS. 
And set the following values in the header:


```

proxy_set_header Host $host;

proxy_set_header X-Real-IP $remote_addr;

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header X-Forwarded-Proto https;

proxy_set_header X-Forwarded-Host $host;

```


You can refer to the template below.

0
Avatar
Descartar
Trịnh Văn Quang

map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}

upstream odoo_servers {
server 127.0.0.1:8069;
keepalive 16;
}
upstream odoo_chat_servers {
server 127.0.0.1:8072;
}

server {
listen 80;
server_name xxx-xxxx.demo.com;
if ($http_x_forwarded_proto != "https") {
return 301 https://$host$request_uri;
}

access_log /var/log/nginx/xxx-xxxx.demo.com.access.log;
error_log /var/log/nginx/xxx-xxxx.demo.com.error.log;

client_max_body_size 5000M;
proxy_max_temp_file_size 5000M;
proxy_connect_timeout 120s;
proxy_send_timeout 3600;
proxy_read_timeout 3600;

location / {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Host $host;

proxy_pass http://odoo_servers;
proxy_http_version 1.1;
}
location /longpolling {
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto https;
proxy_set_header X-Forwarded-Host $host;

proxy_pass http://odoo_chat_servers;
proxy_http_version 1.1;

}
location ~* /web/static/ {
proxy_cache_valid 200 60m;
proxy_buffering on;
expires 864000;
proxy_pass http://odoo_servers;
}

# common gzip
gzip_types text/css text/less text/plain text/xml application/xml application/json application/javascript;
gzip on;
}

Avatar
Israr
Best Answer

please check the odoo log to see if there is --no-header or --no-footer in the record so please uninstall your wkhtmlopdf and reinstall the latest one which is suitable for your os 

thanks

0
Avatar
Descartar
Avatar
Kiran K
Best Answer

Hi  Fernanda,

Try adding this record in Settings > Technical > Parameters  > System Parameters

key: report.url

value: your_ip:port

https://www.youtube.com/watch?v=lC9p_QJUW1Q


0
Avatar
Descartar
Fernanda P
Autor

Thanks for the answer, but I tried your solution and the video and still not working

Kiran K

Can you change the report type to HTML and check, might be some issues with the paper format in PDF

Avatar
shubham shiroya
Best Answer

If you are experiencing issues with the header and footer not showing in the invoice PDF in Odoo 14.0 Community Edition, here are a few steps you can take to troubleshoot and resolve the problem:

  1. Check the PDF settings in the company configuration:

    • Go to "Settings" -> "Companies" -> Select your company.
    • In the "Accounting" tab, make sure the "Header" and "Footer" options are enabled.
    • Save the changes and generate a new invoice PDF to see if the header and footer are now visible.
  2. Verify the document template:

    • Navigate to "Accounting" -> "Configuration" -> "Documents" -> "Document Templates".
    • Search for the template used for the invoice report.
    • Open the template and ensure that the header and footer are defined correctly.
    • Verify that the template includes the necessary variables and expressions to display the company information.
  3. Check the installed wkhtmltopdf version:

    • Ensure that you have the correct version of wkhtmltopdf installed and configured for your Odoo instance.
    • The recommended version for Odoo 14 is wkhtmltopdf 0.12.5. You can download it from the official website: https://wkhtmltopdf.org/downloads.html
    • After installation, restart your Odoo server to apply the changes.
  4. Test with different PDF formats:

    • In the company configuration, try changing the PDF format (e.g., from A4 to Letter) and regenerate the invoice PDF to see if the header and footer appear in a different format.
  5. Check server logs:

    • Monitor the server logs for any error messages related to generating the PDF. Look for any warnings or errors related to wkhtmltopdf.
    • Check if there are any permission issues with the Odoo process accessing the wkhtmltopdf executable.

If the above steps do not resolve the issue, you may need to dig deeper into the configuration and template files to identify the cause. Additionally, you can seek assistance from the Odoo community or consider reaching out to Odoo support for further help in troubleshooting and resolving the specific issue you are facing.

0
Avatar
Descartar
Enjoying the discussion? Don't just read, join in!

Create an account today to enjoy exclusive features and engage with our awesome community!

Registrar-se
Related Posts Respostes Vistes Activitat
No company data in PDF invoice?
pdf invoice v14
Avatar
0
d’abr. 22
857
Can not print/preview account report (invoice) Solved
pdf invoice report v14
Avatar
1
de març 22
4302
PDF Invoice line overflow
pdf invoice
Avatar
Avatar
Avatar
2
de jul. 25
1527
Quote PDF Spacing & Layout
pdf invoice
Avatar
Avatar
1
d’ag. 25
2075
How to apply a customized invoice pdf to an email template
pdf invoice
Avatar
Avatar
1
de juny 24
3279
Community
  • Tutorials
  • Documentació
  • Fòrum
Codi obert
  • Descarregar
  • GitHub
  • Runbot
  • Traduccions
Serveis
  • Allotjament a Odoo.sh
  • Suport
  • Actualització
  • Desenvolupaments personalitzats
  • Educació
  • Troba un comptable
  • Troba un partner
  • Converteix-te en partner
Sobre nosaltres
  • La nostra empresa
  • Actius de marca
  • Contacta amb nosaltres
  • Llocs de treball
  • Esdeveniments
  • Pòdcast
  • Blog
  • Clients
  • Informació legal • Privacitat
  • Seguretat
الْعَرَبيّة Català 简体中文 繁體中文 (台灣) Čeština Dansk Nederlands English Suomi Français Deutsch हिंदी Bahasa Indonesia Italiano 日本語 한국어 (KR) Lietuvių kalba Język polski Português (BR) română русский язык Slovenský jazyk slovenščina Español (América Latina) Español ภาษาไทย Türkçe українська Tiếng Việt

Odoo és un conjunt d'aplicacions empresarials de codi obert que cobreix totes les necessitats de la teva empresa: CRM, comerç electrònic, comptabilitat, inventari, punt de venda, gestió de projectes, etc.

La proposta única de valor d'Odoo és ser molt fàcil d'utilitzar i estar totalment integrat, ambdues alhora.

Website made with

Odoo Experience on YouTube

1. Use the live chat to ask your questions.
2. The operator answers within a few minutes.

Live support on Youtube
Watch now