Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
5630 Widoki

Hello,

As said in the title line. This is happening on a mint Odoo 16 development environment.

I have the following report xml:



As can be seen, I have tried 3 different ways to make the bold text show (fw-bold, o_bold classes and the use of the tag). (sorry about putting the code in an image but the forum was destroying the formatting of the code, no matter which style I used)

All of these 3 will show ok in a Qweb-html report:

But will show without any decoration in the same report when rendered in pdf:


Does anyone have a clue of what's happening here? wkhtmltopdf is installed as per requirements.txt. (binary install - not compiled as compilation is very cumbersome).

Or maybe someone has already had a similar experience.

Thanks fo any help,

PR

Awatar
Odrzuć

Please would you try to print an original odoo pdf report?
Is it generated correctly or without any style?

Autor

Hello Rama,

Thank you for asking. Yes it is happening the same with other reports. No matter which layout I choose.

Hi

use inline style attribute eg: style="font-weight: bolder;"

Hope it helps

Autor

Hello Cybrosys and thank you for your suggestion. That was a fourth option I did not try indeed.

Alas, it didn't work either. I am a bit lost on why it's not working. Can it have anything to do with wkhtml2pdf?

Anyone has an idea on how I could test that?

Thanks

Najlepsza odpowiedź


I had the same problem, but I fixed it by adding as style the sans-serif font family to the line of the page class


As follows




Apparently some font families do not have all the necessary properties, attributes or in this case "weights".



Awatar
Odrzuć
Najlepsza odpowiedź

Hi,

Please try to use inline styling instead of giving class

example:


<span class=fw-bold" style="font_weight:bold !important">Practice type:</span>


Try with the inline styling as in the above example



Hope it helps

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
1
mar 15
7032
5
maj 23
19188
4
paź 16
5878
0
sie 24
1841
1
gru 23
7056