function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion

Making text bold in a PDF

I'm attempting to use CSS to make text bold within a PDF that is generated off of a custom object, below is a snippet of my css and the portion of the PDF code where that style is called, i've also tried just surrounding the text in






Below is the snippet:



  p {
    font-family:Arial Unicode MS;


<b>First Heading</b>





Try this i hope this help u..
<p style="font-size:10pt;font-family:Arial Unicode MS;font-weight:bold;">
<First Heading



Thank you for the reply, i applied the suggested code to no avail, i've read some things that this may be unique to the conversion from visualforce to PDF, that some things can be stripped.  Just thinking this is a pretty simple ability that would be needed.

Joshua LuttmerJoshua Luttmer
I've tried a bunch of different things also.  I am trying to bold only a part of a sentence and tried using <b> <strong> <bold>.  All appear fine on VF Page however when I convert to PDF it strips the Arial Font and reverts back to Times....  Has anyone found a work around to this yet?
This one seems to be working; just achieved a bold output in the PDF. Yeah!

'<span style="font-family: sans-serif; font-weight:bold;">'+Opp.ProjectID__c+'</span>' // -- works
'<span style=\"font-family: sans-serif; font-weight:bold;\">'+Opp.ProjectID__c+'</span>' // -- works
'<span style=\"font-weight:bold;\">'+Opp.ProjectID__c+'</span>'  //-- does not work without the font-family set

1) I used a <span> instead of the <div> in the example but that works, of course.
2) There is a   \   before the   "  double quotes in the exmaple; both having or ommitting this seems to be working
3) not having the font-family set as such appears to be a show stopper - does not work.

This is my very recent experience. Just added this comment if you find this post before the one mentioned at the top of mine.