I'm having lots of trouble setting font faces for VF Email PDF attachments (see my code below). I've tried the conventional "font" tag with no luck, even CSS doesn't work! What am I doing wrong?

<messaging:attachment renderAs="PDF" filename="{!relatedTo.Account__r.Name} - Wrapping Criteria.pdf">
                body { font-family: 'Calibri'; }
            Thank you for submitting your blah blah. We will proceed forward with setting up your blah blahconfiguration and the process will go Live in the next 3 to 5 business days.
            Some <strong>blah Considerations</strong> for your reference:
            1.  Jobs will be automatically updated whenever changes are made to the source website or xml feed.
            2. blah blah and is completed by 6am EST M-F – no wrapping occurs on weekends or major holidays.
            3.  “Profile Matblah blahabled by the administrator of your account through the Admin Console under Contract Settings.
            4.  Job renewal notiblah blayhas the job is active in the source and meets the wrapping criteria.  
            Here’s the sumyolo that will be followed

1 Answer 1


See Supported fonts while redering Visual force page as PDF

Only the following four typefaces are used in PDF. Also, what you can use for font-family are on the right, mapped to the typefaces respectively, where sans-serif, monospace and serif are case insensitive.

  • Helvetica : Dialog, SansSerif or sans-serif
  • Courier : Courier, DialogInput, Monospaced or monospace
  • Times : Times, TimesRoman or serif (or any others inapplicable to the others would be mapped to this)
  • Arial Unicode MS : Arial Unicode MS

Last I heard the underlying PDF rendering engine used by Salesforce was based on Flying Saucer (hat tip to @sfdcfox). How does this help you? You may be able to use Flying Saucer features to embed the required font - YMMV.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .