Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
5 ตอบกลับ
9200 มุมมอง

i just want to change font name in qweb

i wrote like this but its not working for me

<div style="font-size:10px; font-family:TimeNewRoman;">

size applied but font name doesnot apply for this 

anybody can help me


อวตาร
ละทิ้ง

<div style="font-family:Times New Roman; !important" >

your other divs goes here

</div>

คำตอบที่ดีที่สุด

Hi,

You can solve this issue by using @font-face.

Please see Example below

<div class="page">
<style type="text/css">
<![CDATA[
@font-face {
font-family: 'Georgia Bold';
font-style: normal;
font-weight: normal;
src: url('/your_module/static/src/font/georgiab.woff') format('woff');
}
  ]]>
</style>
<p style="font-family: Georgia Bold;">Test </p> 
</page>


Please refer  Doc and similar  Discussion and  Issue  .      


Thanks

อวตาร
ละทิ้ง
ผู้เขียน

<div style = "font-size:10px; font-family: 'TimesNewRoman' !important;">

i wrote like this but didnot working

ผู้เขียน

can you share the link how to install that

Please check updated answer

คำตอบที่ดีที่สุด

Please check your font name: TimesNewRoman.

อวตาร
ละทิ้ง
ผู้เขียน

even though doesnot working ermin

คำตอบที่ดีที่สุด

I had the same issue with Odoo 10 on Debian. To solve the problem, I installed the newest version of wkhtmltopdf.

You can download the version 0.12.5 from this link: https://github.com/wkhtmltopdf/wkhtmltopdf/releases
Once you downloaded the deb file, execute the following commands:

$ sudo dpkg -i name_of_the_deb_file
$ sudo cp /usr/local/bin/wkhtmltopdf /usr/bin
$ sudo cp /usr/local/bin/wkhtmltoimage /usr/bin

Once installed, you can execute the following command to make sure the newest version is correctly installed

$ wkhtmltopdf --version
wkhtmltopdf 0.12.5 (with patched qt)

After that, restart Odoo and the report should look fine.

Best regards
Yvan

อวตาร
ละทิ้ง
ผู้เขียน

can you share the link how to install

I updated my post

ผู้เขียน

insatlled yuvan even though doesnot working too tried from 2days onwards exhausted help me how to do

Do you save the report as an attachment? If it's the case, an existing report won't be rendered anymore and the changes you make in the report definition won't be visible. To change this option, go to Settings -> Reports -> Reports and select your report. In the form view select the page Advanced Properties where you will find the option Reload from Attachment.

You could also try to show the report as html instead of pdf. If the html output shows the correct font, the problem is related to wkhtmltopdf. To change the report type, go to Settings -> Reports -> Reports and select your report. In the form view, change the Report type from PDF to HTML. Save the changes and give a try.

ผู้เขียน

actually in html view it is working in pdf doesnot working

Unfortunately, I don't have any further advice. I hope you will still find a solution

Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 24
19539
How to install odoo 10 in ubuntu 20.04? แก้ไขแล้ว
1
ก.ย. 23
2396
3
พ.ค. 23
5100
7
เม.ย. 23
48366
Barcode scanner from mobile แก้ไขแล้ว
1
ธ.ค. 22
7327