Dompdf font family issue

I am using Bamboo invoice as an invoice generator and I am trying to customize the invoice template, but no matter what I do, the font just won't adjust.

currently I have

body {
margin: 0.5in;
font-family: 'helvetica';
font-size: 10pt;}

      

I read about this and helvetica is the installed font, so it should work

to make sure I changed it to "courier"; which is also in the lib / fonts directory, but the font remains the same.

Any help?

+2


a source to share


4 answers


Late, but still applicable for Google visitors.

I had a similar problem with DomPDF, but since BambooInvoice uses it ... DomPDF is having trouble defining font family in CSS anyway. I applied inline style to the top div to solve the problem.



<div id="container" style="font-family:sans-serif;">
....
</div>

      

+3


a source


I had a similar issue with DomPDF 6b3 when trying to use font family or font size. Finally, it turned out that using the font instead of the ones that seem to work.



+2


a source


I solved my problem by deleting font: inherit

which was applied as "css-reset" to almost all elements as the first declaration. Apparently this is not overridden by later declarations and / or inheritance is not working as expected.

+2


a source


Remove quotes around helvetica

.

0


a source







All Articles