3

I have a class within a .css file in static resource like so:

.bold-font-thin-top-border-bg-yellow { 
    width: 100%; 
    font-weight: bold; 
    border-top-style: solid; 
    border-width: thin; 
    background-color: yellow; 
}

There is an apex:column in a VF page, that is rendered as PDF, that uses above in its styleClass attribute. Everything works except the font is NOT bold.

What am I missing?

4

This appears to be an issue with Salesforce PDF engine (at least with API version 34).

Adding font-family: sans-serif; fixed the problem:

.bold-font-thin-top-border-bg-yellow { 
    font-family: sans-serif;
    width: 100%;
    font-weight: bold; 
    border-top-style: solid;
    border-width: thin;
    background-color: yellow; 
}
2
  • 1
    I have the same issue, font-family: sans-serif does not work for cyrillic. I have to use font-family: 'Arial Unicode MS'; Apr 12 '16 at 19:30
  • @vladdihoney so weird I had font-family: 'Arial Unicode MS'; and it got fixed when i change it to font-family: sans-serif; API version of page is 36
    – manza
    Nov 28 '17 at 23:59
1

I know this is old thread, but there is bug with Salesforce PDF engine and font family "Arial Unicode MS" + "Font Family: bold" See below simple PDF image and you will see why it is working for other fonts and not "Arial Unicode MS"

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.