Ir al contenido
Odoo Menú
  • Identificarse
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • TPV para tiendas
    • TPV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en directo
    • eLearning
    Cadena de suministro
    • Inventario
    • Fabricación
    • PLM
    • Compra
    • Mantenimiento
    • Calidad
    Recursos Humanos
    • Empleados
    • Reclutamiento
    • Ausencias
    • Evaluación
    • Referencias
    • Flota
    Marketing
    • Marketing social
    • Marketing por correo electrónico
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyecto
    • Partes de horas
    • Servicio de campo
    • Servicio de asistencia
    • Planificación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Información
    • WhatsApp
    Aplicaciones de terceros Studio de Odoo Plataforma de Odoo Cloud
  • Industrias
    Comercio al por menor
    • Librería
    • Tienda de ropa
    • Tienda de muebles
    • Tienda de ultramarinos
    • Ferretería
    • Juguetería
    Alimentación y hostelería
    • Bar y taberna
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidor de bebidas
    • Hotel
    Inmueble
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión inmobiliaria
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Empresa contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Fabricación
    • Textil
    • Metal
    • Muebles
    • Alimentos
    • Brewery
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y asistencia informática
    • Sistemas de energía solar
    • Zapatero
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin ánimo de lucro
    • Agencia de protección del medio ambiente
    • Alquiler de paneles publicitarios
    • Estudio fotográfico
    • Alquiler de bicicletas
    • Distribuidor de software
    Browse all Industries
  • Comunidad
    Aprender
    • Tutoriales
    • Documentación
    • Certificaciones
    • Formación
    • Blog
    • Podcast
    Potenciar la educación
    • Programa de formación
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtener el software
    • Descargar
    • Comparar ediciones
    • Versiones
    Colaborar
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Convertirse en partner
    • Services for Partners
    • Registrar tu empresa contable
    Obtener servicios
    • Encontrar un partner
    • Encontrar un asesor fiscal
    • Contacta con un experto
    • Servicios de implementación
    • Referencias de clientes
    • Ayuda
    • Actualizaciones
    GitHub YouTube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicitar una demostración
  • Precios
  • Ayuda

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

  • CRM
  • e-Commerce
  • Contabilidad
  • Inventario
  • PoS
  • Proyecto
  • MRP
All apps
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Debe estar registrado para interactuar con la comunidad.
Todas las publicaciones Personas Insignias
Etiquetas (Ver todo)
odoo accounting v14 pos v15
Acerca de este foro
Ayuda

Header and footer not showing in PDF

Suscribirse

Reciba una notificación cuando haya actividad en esta publicación

Se marcó esta pregunta
pdfinvoicev14
11 Respuestas
34044 Vistas
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
Mejor respuesta

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
shaneebkhan
Mejor respuesta

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
Bernard Wilmus
Mejor respuesta

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
jaydeep chaudhari
Mejor respuesta

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
Mejor respuesta

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
Mejor respuesta

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
Mejor respuesta

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
Mejor respuesta

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
Mejor respuesta

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
Mejor respuesta

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
Mejor respuesta

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
¿Le interesa esta conversación? ¡Participe en ella!

Cree una cuenta para poder utilizar funciones exclusivas e interactuar con la comunidad.

Inscribirse
Publicaciones relacionadas Respuestas Vistas Actividad
No company data in PDF invoice?
pdf invoice v14
Avatar
0
abr 22
857
Can not print/preview account report (invoice) Resuelto
pdf invoice report v14
Avatar
1
mar 22
4338
PDF Invoice line overflow
pdf invoice
Avatar
Avatar
Avatar
2
jul 25
1551
Quote PDF Spacing & Layout
pdf invoice
Avatar
Avatar
1
ago 25
2100
How to apply a customized invoice pdf to an email template
pdf invoice
Avatar
Avatar
1
jun 24
3309
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento Odoo.sh
  • Ayuda
  • Actualizar
  • Desarrollos personalizados
  • Educación
  • Encontrar un asesor fiscal
  • Encontrar un partner
  • Convertirse en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contacta con nosotros
  • Puestos de trabajo
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • Información legal • Privacidad
  • Seguridad
الْعَرَبيّة 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 es un conjunto de aplicaciones de código abierto que cubren todas las necesidades de tu empresa: CRM, comercio electrónico, contabilidad, inventario, punto de venta, gestión de proyectos, etc.

La propuesta única de valor de Odoo es ser muy fácil de usar y totalmente integrado.

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