Hello all,
Somebody here know how to change the font type in a PDF report?
I'm on Odoo v8.
Thanks
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Hello all,
Somebody here know how to change the font type in a PDF report?
I'm on Odoo v8.
Thanks
I had the same problem but managed it with report.style
Howto:
Install the truetype font under /usr/share/fonts & restart server
Goto website and choose html editor
Choose style from dropdown and add your font under body
body {
color: #000 !important;
word-wrap: break-word;
font-family: Open Sans;
}
Save it and generate the qweb report.
Pascal, I'm strugling with the same problem. Managed to change the font type of the HTML but as soon as you turn them back into PDF font is back to basic.
If I find solution, I will come back here to write it.
Look at this one, it works for me today. It's the only CSS I need for the moment.
<?xml version="1.0"?>
<t t-name="account.report_invoice_document">
<t t-call="report.external_layout">
<div style="font-family: Ubuntu;" class="page">
<div class="row">
<div class="col-xs-5 col-xs-offset-7">
<h4><strong>Invoicing address : </strong></h4>
<div style="margin-left: 20px;">
<address t-field="o.partner_id" t-field-options="{"widget": "contact", "fields": ["address", "name"], "no_marker": true}"/>
<span t-field="o.partner_id.vat"/>
</div>
</div>
</div>
.......
See PDF with the margin-left and Ubuntu font.
Style should be defined inline. File containing custom CSS is not found during PDF conversion.
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign upRelated Posts | Replies | Views | Activity | |
---|---|---|---|---|
|
2
Nov 24
|
6114 | ||
|
4
Nov 24
|
5238 | ||
|
1
Mar 24
|
398 | ||
|
3
Sep 23
|
22661 | ||
|
0
Feb 24
|
1718 |