Skip to Content
Odoo Меню
  • Увійти
  • Спробуйте це безкоштовно
  • Додатки
    Фінанси
    • Бухоблік
    • Виставлення рахунку
    • Витрати
    • Електронні таблиці (BI)
    • Документи
    • Підпис
    Продажі
    • CRM
    • Продажі
    • POS Магазин
    • POS Ресторан
    • Підписки
    • Оренда
    Веб-сайти
    • Конструктор веб-сайту
    • Електронна комерція
    • Блог
    • Форум
    • Живий чат
    • Електронне навчання
    Ланцюг поставок
    • Склад
    • Виробництво
    • PLM
    • Купівлі
    • Технічне обслуговування
    • Якість
    Кадри
    • Співробітники
    • Рекрутинг
    • Відпустки
    • Оцінювання
    • Рекомендації
    • Автотранспорт
    Маркетинг
    • Маркетинг соцмереж
    • Email-маркетинг
    • SMS-маркетинг
    • Події
    • Автом. маркетингу
    • Опитування
    Послуги
    • Проект
    • Табелі
    • Виїзне обслуговування
    • Служба підтримки
    • Планування
    • Призначення
    Продуктивність
    • Обговорення
    • Схвалення
    • IoT
    • IP-телефонія
    • База знань
    • WhatsApp
    Сторонні модулі Odoo Studio Платформа Odoo Cloud
  • Сфери
    Роздрібна торгівля
    • Книжковий магазин
    • Магазин одягу
    • Магазин меблів
    • Продуктовий магазин
    • Магазин будівельних матеріалів
    • Магазин іграшок
    Food & Hospitality
    • Бар та паб
    • Ресторан
    • Фастфуд
    • Guest House
    • Дистриб'ютор напоїв
    • Hotel
    Нерухомість
    • Real Estate Agency
    • Архітектурна фірма
    • Будівництво
    • Управління нерухомістю
    • Садівництво
    • Асоціація власників нерухомості
    Консалтинг
    • Бухгалтерська компанія
    • Партнер Odoo
    • Агенція маркетингу
    • Юридична фірма
    • Придбання Талантів
    • Аудит та сертифікація
    Виробництво
    • Textile
    • Metal
    • Меблі
    • Їжа
    • Brewery
    • Корпоративні подарунки
    Здоров'я & Фітнес
    • Спортивний клуб
    • Оптика
    • Фітнес-центр
    • Практики здоров'я
    • Аптека
    • Салон краси
    Trades
    • Ремонтник
    • IT-обладнання та Підтримка
    • Системи сонячної енергії
    • Shoe Maker
    • Cleaning Services
    • HVAC Services
    Інші
    • Nonprofit Organization
    • Екологічна агенція
    • Оренда білбордів
    • Фотографія
    • Лізинг велосипедів
    • Реселлер програмного забезпечення
    Browse all Industries
  • Спільнота
    Навчання
    • Навчальний посібник
    • Документація
    • Сертифікації
    • Тренування
    • Блог
    • Подкаст
    Сприяйте Освіті
    • Програма навчання
    • Бізнес гра Scale Up!
    • Відвідайте Odoo
    Отримайте програмне забезпечення
    • Завантаження
    • Порівняйте версії
    • Релізи
    Співпрацюйте
    • Github
    • Форум
    • Події
    • Переклади
    • Стати партнером
    • Services for Partners
    • Зареєструйте вашу бухгалтерську фірму
    Отримайте послуги
    • Знайдіть партнера
    • Знайдіть бухгалтера
    • Зустріньтеся з консультантом
    • Послуги з впровадження
    • Референси клієнтів
    • Підтримка
    • Оновлення
    Github Youtube Twitter Linkedin Instagram Facebook Spotify
    +1 (650) 691-3277
    Отримати демо
  • Ціни
  • Допомога

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

  • CRM
  • e-Commerce
  • Бухоблік
  • Склад
  • PoS
  • Проект
  • MRP
All apps
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Вам необхідно зареєструватися, щоб взаємодіяти зі спільнотою.
All Posts Люди Значки
Мітки (View all)
odoo accounting v14 pos v15
Про цей форум
Допомога

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

Підписатися

Отримуйте сповіщення про активність щодо цієї публікації

Це запитання позначене
macosxOnPremiseodoo16
8 Відповіді
5294 Переглядів
Аватар
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
Аватар
Відмінити
Mohammed Ajmal

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

Аватар
Ajin A K
Найкраща відповідь

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
Аватар
Відмінити
Hamza Benzaoui
Автор

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.

Аватар
Niyas Raphy (Walnut Software Solutions)
Найкраща відповідь

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

1
Аватар
Відмінити
Hamza Benzaoui
Автор

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

Аватар
Leofren Technologies
Найкраща відповідь

Hello,

Are you able to solve the issue?

0
Аватар
Відмінити
Аватар
mo man
Найкраща відповідь

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
Аватар
Відмінити
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.

Аватар
Gracious Joseph
Найкраща відповідь

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
Аватар
Відмінити
Аватар
Xabier Arrabal Amat
Найкраща відповідь

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
Аватар
Відмінити
Аватар
Paul Minard
Найкраща відповідь

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
Аватар
Відмінити
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.

Аватар
Hamza Benzaoui
Автор Найкраща відповідь

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
Аватар
Відмінити
Enjoying the discussion? Don't just read, join in!

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

Реєстрація
Related Posts Відповіді Переглядів Дія
Automatic Batch Transfer Вирішено
odoo16
Аватар
Аватар
1
серп. 25
1421
Automatic Batch Transfer
odoo16
Аватар
Аватар
1
трав. 25
2240
Bank statement import via email
odoo16
Аватар
0
лист. 24
2175
Display 'total' ( Like in Sale Order) on TOP
odoo16
Аватар
Аватар
2
жовт. 24
2210
I have a manufacturing type product that comes out with 0 stock despite having materials.
odoo16
Аватар
0
серп. 24
1676
Спільнота
  • Навчальний посібник
  • Документація
  • Форум
Open Source
  • Завантаження
  • Github
  • Runbot
  • Переклади
Послуги
  • Хостинг Odoo.sh
  • Підтримка
  • Оновлення
  • Кастомні доробки
  • Навчання
  • Знайдіть бухгалтера
  • Знайдіть партнера
  • Стати партнером
Про нас
  • Наша компанія
  • Торгові активи
  • Зв'яжіться з нами
  • Вакансії
  • Події
  • Подкаст
  • Блог
  • Клієнти
  • Юридичні документи • Конфіденційність
  • Безпека
الْعَرَبيّة 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 - це набір програм для роботи з відкритим кодом, які охоплюють всі ваші потреби компанії: CRM, електронна комерція, бухгалтерський облік, склад, точка продажу, управління проектами тощо.

Унікальна пропозиція Odoo - це одночасно дуже проста у використанні та повністю інтегрована.

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