Ir al contenido
Menú
Se marcó esta pregunta
2 Respuestas
1710 Vistas

Hello All,
I faced the problem that when I print a (signed document) that contains Arabic characters, it shows as a black square. odoo17

Avatar
Descartar

is this custom report or default one?

Mejor respuesta

Hello, 

This is a known issue in Arabic and some other Languages. To solve it, you need to use sign.use_custom_font parameter by adding it to System Parameter as below:

  • Enable developer mode.
  • Open Settings -> Technical -> System Parameter 
  •  Add the below parameter:

​   key: sign.use_custom_font

​   value: FreeSerifBold 

You can use any system TTF fonts support Arabic like FreeSerifBold, FreeSerif or Sun-ExtA.

Below is the Odoo Commit to fix this issue:

[FIX] sign: font support for Cyrillic in sign reportBrowse files
Steps to reproduce:
- install sign
- upload a pdf and add a text field
- fill in the document with Cyrillic characters

The characters are displayed as black boxes

It is now possible to use the `sign.use_custom_font`
`ir.config_parameter` in order to use any system font on top of the
fonts available in `sign/static/font/`. This commit also adds
`NotoSans-Reg` for Cyrillic support since the TTF file is relatively
lightweight. However, other languages (e.g. traditinal Chinese) may be much heavier and should be installed directly on the system.

Note that only TTF fonts are supported. Therefore, conversion might be necessary, for example wih `otf2ttf`.


Note: This change will take effect on the new signed document and the Arabic letters will be rendered but will not displayed properly as you can see in the below screenshot. this last issue just solved 2 weeks ago in Odoo 17.4 and Odoo 18.0, I'm not sure if the solution will be back port to 17.0.

Hope this help you and anyone have the same issue.




Avatar
Descartar
Autor Mejor respuesta

default one

Avatar
Descartar