You need to sign in to do that
Don't have an account?
April Robinson
How do I bold the column headers with Render as PDF?
I'm a SQL Server dba who got tasked with creating a Salesforce Visualforce page that renders as PDF only. I'm completely unfamiliar with apex and visualforce. I managed to make a page that works. But they want me to bold the column headings on the table that is displayed there. I tried numerous methods that I found online from "inline styles" to "static resource styles" to "facets" and none of them has any affect on the PDF output at all. Maybe I didn't correctly reference the static resource? I'm totally lost. Can anyone point me to some instructions or something? Is there an "Apex syntax for dummies" book? Here's the current rendition of my table although it's probably irrelevant the way it is:
<apex:pageBlockTable border="1" style="font-size:10.0pt;font-family:Arial Unicode MS" value="{!MyCustomObject__c.lses__r}" var="lse">
<apex:column headerValue="MyColumn1" style="width:20%" value="{!lse.customfield1}" />
<apex:column headerValue="MyColumn2" style="width:15%" value="{!lse.customfield2}"/>
<apex:column headerValue="MyColumn3" style="width:15%" value="{!lse.customfield3}"/>
<apex:column headerValue="MyColumn4" style="width:15%" value="{!lse.customfield4}"/>
<apex:column headerValue="MyColumn5" style="width:15%" value="{!lse.customfield5}"/>
<apex:column headerValue="MyColumn6" style="width:20%" value="{!lse.customfield6}"/>
</apex:pageBlockTable>
<apex:pageBlockTable border="1" style="font-size:10.0pt;font-family:Arial Unicode MS" value="{!MyCustomObject__c.lses__r}" var="lse">
<apex:column headerValue="MyColumn1" style="width:20%" value="{!lse.customfield1}" />
<apex:column headerValue="MyColumn2" style="width:15%" value="{!lse.customfield2}"/>
<apex:column headerValue="MyColumn3" style="width:15%" value="{!lse.customfield3}"/>
<apex:column headerValue="MyColumn4" style="width:15%" value="{!lse.customfield4}"/>
<apex:column headerValue="MyColumn5" style="width:15%" value="{!lse.customfield5}"/>
<apex:column headerValue="MyColumn6" style="width:20%" value="{!lse.customfield6}"/>
</apex:pageBlockTable>
Did you try this?
Or try this:
Try the above and let me know.
<apex:pageBlockTable border=".75" value="{!MyCustomObject__c.lses__r}" var="lse">
<apex:column style="width:20%">
<apex:facet name= "header" >
<div Style="font-weight:800; font-size:10.0pt; font-family:Arial Unicode MS; background-color:#d3d3d3">
MyColumn1
</div>
</apex:facet>
{!lse.customfield1}
</apex:column>
<apex:column style="width:20%">
<apex:facet name= "header" >
<div Style="font-weight:800; font-size:10.0pt; font-family:Arial Unicode MS; background-color:#d3d3d3">
MyColumn2
</div>
</apex:facet>
{!lse.customfield2}
</apex:column>
and so on....
</apex:pageBlockTable>