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
RivoRivo 

Formatting the font using <apex:outputField>

Hi Guys,

 

I am playing around with VisualForce and PDF rendering. Basically I have a custom object called 'Meeting Reports' and I want to create a custom link called 'Minutes' that references the information in the object and produces the minutes in pdf format.

 

I am however having a problem with <apex:ouputField> whereby I can't seem to set the font size despite reference a style. The field I am referencing is Rich Text and I want to retain bulletting etc (which apex:outputText doesn't allow). Unfortunately the VisualForce page displays the text in a huge font.

 

Any ideas???

 

<apex:page renderAs="pdf" standardController="Meeting_Report__c">
<html>
 <head>
  <style> 
     body {font-family: Arial Unicode MS;}
     .companyName {
    font-weight:bold;
    font-size:11px;
    color:Black}  
  </style>
 </head>
                    
        <apex:image url="https://eu1.salesforce.com/resource/1301498442000/LCH_Logo"/>
              
        <h1>Meeting Minutes</h1>
           <hr></hr>
                <apex:panelGrid columns="2" width="100%">
                        Client:          <apex:outputField value="{!Meeting_Report__c.Account__c}" />
                        Date / Time:    <apex:outputField value="{!Meeting_Report__c.Date_and_Time__c}" />
                        Location:          <apex:outputField value="{!Meeting_Report__c.Location__c}" />
                </apex:panelGrid>
           <hr></hr>
        
        <apex:panelGrid columns="1" width="100%">
                <apex:outputText value="{!Meeting_Report__c.Purpose__c}" styleClass="companyName"/>
                <apex:outputField value= "{!Meeting_Report__c.Report__c}" styleClass="companyName"/>
        </apex:panelGrid>

        
</html>
</apex:page>