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
    • e-learning
    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
    • Conocimientos
    • 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 pub
    • 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
    • Cervecería
    • Regalos de empresas
    Salud y bienestar
    • Club deportivo
    • Óptica
    • Gimnasio
    • Terapeutas
    • Farmacia
    • Peluquería
    Oficios
    • Handyman
    • Hardware y soporte técnico
    • 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
    Explorar todos los sectores
  • 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
    • Servicios para 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

Weird text in the generated PDF in MacOS 14.5, Odoo 16 on-premise

Suscribirse

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

Se marcó esta pregunta
macosxOnPremiseodoo16
8 Respuestas
5271 Vistas
Avatar
Hamza Benzaoui

Hello everyone

I have been getting this weird generated PDF (images are below) in a MacBook Pro Apple Silicon, the logo looks fine but the text doesn't and sometimes it's not shown at all, it's in Quotation, Sales Order...

I have tried everything:

  • Reinstalled wkhtmltopdf and install older versions
  • Adding report.url : http://127.0.0.1:8069
  • Adding webkit_path: /usr/local/bin/wkhtmltopdf
  • Install what supposed to be and arm version package wkhtmltox-0.12.6-1.macos-cocoa.pkg

And nothing works , the thing is sometimes it works just fine and sometimes doesn't and i can't understand the pattern.

Has anyone encounter this error before I would be glad if you can help

Images of the generate PDF:





0
Avatar
Descartar
Mohammed Ajmal

I do have the same issue, were you able to solve it?

Avatar
Ajin A K
Mejor respuesta

Hi,

Please ensure wkhtmltopdf has proper permissions to access the files and directories it needs. Run chmod +x /usr/local/bin/wkhtmltopdf to make it executable and verify the webkit_path points to the correct location of the installed wkhtmltopdf. You can check the path with which wkhtmltopdf.

1
Avatar
Descartar
Hamza Benzaoui
Autor

I did run "sudo chmod +x /usr/local/bin/wkhtmltopdf" and add webkit_path: /usr/local/bin/wkhtmltopdf to the system parameters as well. and unfortunately I keep getting these weird PDF from time to time. am thinking it has issues with the Rosetta 2 as there are not arm version for the wkhtmltopdf.

Ajin A K

Check repositories like https://packagist.org/packages/houseoftech/wkhtmltopdf-arm64 that offer pre-built ARM versions.

Avatar
Niyas Raphy (Walnut Software Solutions)
Mejor respuesta

Hi,
Can you try installing wkhtmltopdf 0.12.5 and see if it makes any difference ?
Thanks

1
Avatar
Descartar
Hamza Benzaoui
Autor

Hey Niyas, thanks for your replay, and I did. I already tried that as i had same issues with wkhtmltopdf 0.12.6 in ubuntu in the past and i downgrade to 0.12.5 and it worked fine in Ubuntu, so i thought I'll do the same in MacOS, but unfortunately it didn't work and kept getting those weird text pdfs in 0.12.5 as well

Avatar
Leofren Technologies
Mejor respuesta

Hello,

Are you able to solve the issue?

0
Avatar
Descartar
Avatar
mo man
Mejor respuesta

I have the same problem on m2 pro running macOS 15.2. 

Tried to install in rosetta mode and odoo prints wrong fonts, no fonts and blanks. I have tried the the webkit path, report.url in all different ways possible, nothing works. Sometimes it will print properly but mostly its completely wrong.

I have installed 0.12.6 and 0.12.5 all version of them as well

Has anyone found a solution to this?

0
Avatar
Descartar
mo man

Anybody found a solution to this?

mo man

I tried the Mac ports version but unfortunately it wasn’t qt patched and so it didn’t work.

mo man

It’s finally fixed!!
This now appears to be working correctly on macos26 beta 1.

Avatar
Gracious Joseph
Mejor respuesta

The PDF rendering issue you are experiencing on MacOS when using Odoo might be related to the wkhtmltopdf configuration, font rendering, or compatibility with the macOS platform. Below are some steps and suggestions to resolve this issue:

Troubleshooting Steps:

1. Font Rendering Issue

  • Ensure Fonts Are Installed Correctly:
    • Install any custom fonts required for the report on the MacOS system.
    • Check if the fonts used in the Odoo templates are supported by wkhtmltopdf.
  • Embed Fonts in the Template:
    • Use CSS in your report templates to explicitly include or embed fonts.
    @font-face {
        font-family: 'CustomFont';
        src: url('path/to/font.woff') format('woff');
    }
    body {
        font-family: 'CustomFont', sans-serif;
    }
    

2. Verify wkhtmltopdf Configuration

  • Install the Correct Version:
    • Use version 0.12.5 or 0.12.6 of wkhtmltopdf, which is known to work well with Odoo. Ensure it matches the architecture (ARM or Intel-based Mac).
  • Set Path Correctly:
    • Confirm the path in odoo.conf:
      [options]
      webkit_path = /usr/local/bin/wkhtmltopdf
      
    • Restart Odoo after making changes:
      sudo service odoo restart
      
  • Test Command-Line Rendering: Run wkhtmltopdf from the terminal to check if it produces consistent results:
    wkhtmltopdf http://example.com test.pdf
    

3. Update Report URL

  • Add the following to odoo.conf:
    report.url = http://127.0.0.1:8069
    
  • Restart Odoo to apply the changes.

4. Debug Rendering Behavior

  • Open browser developer tools and inspect how the report appears in the browser before rendering.
  • Check for any errors in Odoo's log file during report generation.

5. Verify CSS and Template Consistency

  • Ensure consistent font and CSS usage in your report template.
  • Sometimes, conflicting CSS rules can cause issues with PDF rendering.

Recommendations for Better Compatibility

Switch to a Different PDF Rendering Library

If wkhtmltopdf is unreliable, consider switching to an alternative library like WeasyPrint. You can install and configure it for Odoo as follows:

  1. Install WeasyPrint:
    pip install weasyprint
    
  2. Configure Odoo to Use WeasyPrint: Modify your report templates or write a custom module to use WeasyPrint instead of wkhtmltopdf.

Check for Odoo Updates or Patches

Verify if there are any updates or patches for your version of Odoo that address PDF generation issues.

Use a Virtual Environment

Run wkhtmltopdf in a virtualized Linux environment (e.g., Docker) to avoid Mac-specific issues.

Summary

This issue likely stems from font rendering or wkhtmltopdf inconsistencies on MacOS. Start by verifying the fonts, CSS, and wkhtmltopdf installation. If the problem persists, consider alternative solutions like WeasyPrint or using a virtualized environment.

If you need help with any of these steps, let me know!

0
Avatar
Descartar
Avatar
Xabier Arrabal Amat
Mejor respuesta

I had the same problem, and clearing the browser cache resolved it. Try clearing your browser’s cache and then reload the page. On most browsers, you can do this by pressing Ctrl+Shift+Delete (or Cmd+Shift+Delete on macOS) and selecting the cache to clear.

0
Avatar
Descartar
Avatar
Paul Minard
Mejor respuesta

Hi,

Has your problem been solved? 

If so, could you post the solution? I have a Mac M1 and I have the same problem with odoo V17.

0
Avatar
Descartar
Sagar Mokariya

i am also looking for the same solution, This issue is may be wkhtmltopdf with rosetta translation. If you got any solution on this update here we are waiting for this. May @odoo Need to do something on this.

Avatar
Hamza Benzaoui
Autor Mejor respuesta

Notice how it's different each time I print a pdf:

  1. https://imgur.com/a/LNU0Idu
  2. https://imgur.com/a/9yHVYWP
  3. https://imgur.com/a/gL6I41m
  4. https://imgur.com/a/Niphs0D

Notice how the first time the text was not Bold as the second and the third time then it was empty in the forth time, I just don't get it some times it print just fine and sometimes not! 

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
Automatic Batch Transfer Resuelto
odoo16
Avatar
Avatar
1
ago 25
1420
Automatic Batch Transfer
odoo16
Avatar
Avatar
1
may 25
2232
Bank statement import via email
odoo16
Avatar
0
nov 24
2174
Display 'total' ( Like in Sale Order) on TOP
odoo16
Avatar
Avatar
2
oct 24
2206
I have a manufacturing type product that comes out with 0 stock despite having materials.
odoo16
Avatar
0
ago 24
1676
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