Ir al contenido
Odoo Menú
  • Iniciar sesión
  • Pruébalo gratis
  • Aplicaciones
    Finanzas
    • Contabilidad
    • Facturación
    • Gastos
    • Hoja de cálculo (BI)
    • Documentos
    • Firma electrónica
    Ventas
    • CRM
    • Ventas
    • PdV para tiendas
    • PdV para restaurantes
    • Suscripciones
    • Alquiler
    Sitios web
    • Creador de sitios web
    • Comercio electrónico
    • Blog
    • Foro
    • Chat en vivo
    • eLearning
    Cadena de suministro
    • Inventario
    • Manufactura
    • PLM
    • Compras
    • Mantenimiento
    • Calidad
    Recursos humanos
    • Empleados
    • Reclutamiento
    • Vacaciones
    • Evaluaciones
    • Referencias
    • Flotilla
    Marketing
    • Redes sociales
    • Marketing por correo
    • Marketing por SMS
    • Eventos
    • Automatización de marketing
    • Encuestas
    Servicios
    • Proyectos
    • Registro de horas
    • Servicio externo
    • Soporte al cliente
    • Planeación
    • Citas
    Productividad
    • Conversaciones
    • Aprobaciones
    • IoT
    • VoIP
    • Artículos
    • WhatsApp
    Aplicaciones externas Studio de Odoo Plataforma de Odoo en la nube
  • Industrias
    Venta minorista
    • Librería
    • Tienda de ropa
    • Mueblería
    • Tienda de abarrotes
    • Ferretería
    • Juguetería
    Alimentos y hospitalidad
    • Bar y pub
    • Restaurante
    • Comida rápida
    • Casa de huéspedes
    • Distribuidora de bebidas
    • Hotel
    Bienes inmuebles
    • Agencia inmobiliaria
    • Estudio de arquitectura
    • Construcción
    • Gestión de bienes inmuebles
    • Jardinería
    • Asociación de propietarios
    Consultoría
    • Firma contable
    • Partner de Odoo
    • Agencia de marketing
    • Bufete de abogados
    • Adquisición de talentos
    • Auditorías y certificaciones
    Manufactura
    • Textil
    • Metal
    • Muebles
    • Comida
    • Cervecería
    • Regalos corporativos
    Salud y ejercicio
    • Club deportivo
    • Óptica
    • Gimnasio
    • Especialistas en bienestar
    • Farmacia
    • Peluquería
    Trades
    • Personal de mantenimiento
    • Hardware y soporte de TI
    • Sistemas de energía solar
    • Zapateros y fabricantes de calzado
    • Servicios de limpieza
    • Servicios de calefacción, ventilación y aire acondicionado
    Otros
    • Organización sin fines de lucro
    • Agencia para la protección del medio ambiente
    • Alquiler de anuncios publicitarios
    • Fotografía
    • Alquiler de bicicletas
    • Distribuidor de software
    Descubre todas las industrias
  • Odoo Community
    Aprende
    • Tutoriales
    • Documentación
    • Certificaciones
    • Capacitación
    • Blog
    • Podcast
    Fortalece la educación
    • Programa educativo
    • Scale Up! El juego empresarial
    • Visita Odoo
    Obtén el software
    • Descargar
    • Compara ediciones
    • Versiones
    Colabora
    • GitHub
    • Foro
    • Eventos
    • Traducciones
    • Conviértete en partner
    • Servicios para partners
    • Registra tu firma contable
    Obtén servicios
    • Encuentra un partner
    • Encuentra un contador
    • Contacta a un consultor
    • Servicios de implementación
    • Referencias de clientes
    • Soporte
    • Actualizaciones
    GitHub YouTube Twitter LinkedIn Instagram Facebook Spotify
    +1 (650) 691-3277
    Solicita 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
  • Proyectos
  • 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
5304 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.

Registrarse
Publicaciones relacionadas Respuestas Vistas Actividad
Automatic Batch Transfer Resuelto
odoo16
Avatar
Avatar
1
ago 25
1421
Automatic Batch Transfer
odoo16
Avatar
Avatar
1
may 25
2240
Bank statement import via email
odoo16
Avatar
0
nov 24
2175
Display 'total' ( Like in Sale Order) on TOP
odoo16
Avatar
Avatar
2
oct 24
2212
I have a manufacturing type product that comes out with 0 stock despite having materials.
odoo16
Avatar
0
ago 24
1677
Comunidad
  • Tutoriales
  • Documentación
  • Foro
Código abierto
  • Descargar
  • GitHub
  • Runbot
  • Traducciones
Servicios
  • Alojamiento en Odoo.sh
  • Soporte
  • Actualizaciones del software
  • Desarrollos personalizados
  • Educación
  • Encuentra un contador
  • Encuentra un partner
  • Conviértete en partner
Sobre nosotros
  • Nuestra empresa
  • Activos de marca
  • Contáctanos
  • Empleos
  • Eventos
  • Podcast
  • Blog
  • Clientes
  • 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 estar totalmente integrado.

Sitio web hecho con

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