• pchatelle
  • NEWBIE
  • 0 Points
  • Member since 2013

  • Chatter
    Feed
  • 0
    Best Answers
  • 0
    Likes Received
  • 0
    Likes Given
  • 0
    Questions
  • 1
    Replies

Hi Guys,

 

I have created a VF Page, which is linked to a button called "Generate PDF", which renders a record of a Custom Object as a PDF.

 

I'm using the PanelGrid feature for my page, as this PDF should appear like a nice, clear form - which can then be saved or emailed etc.

 

However, I'm struggling with a couple of issues:

 

1 - I'm specifying the font as Helvetica - but it is still coming through as Times New Roman

 

2 - I would like there to be a space (blank line/carriage return/line break - whatever the correct terminology is) under the section headings (which I've made via a standard outputtext created outside of a PanelGrid) - but nothing I've tried seems to work

 

3 - I would like for the Column widths for each of the PanelGrids to be the same, that is, not each column must be of equal width, but all the first columns should be the same as each other, all of the second columns should be the same, etc - for all four columns, see e.g. below:

 

Panel Grid 1

Col A | Col B | Col C | Col D

 

Panel Grid 2

Col A | Col B | Col C | Col D

 

Panel Grid 3

Col A | Col B | Col C | Col D

 

So what I would want would be for all the Col A's to be the same width, all the Col B's to be the same etc...

 

See entire VF Page code below:

 

(Any help would be greatly appreciated).  Many thanks, Andy.

 

 

<apex:page renderAs="pdf" StandardController="Adverse_Incident__c">

<style>
   .colstyle {width:25%}
</style>

<apex:outputText style="font-style:bold; font-weight:bold; font-size:20px; font-family:Helvetica" value="Incident Information"/>

  <apex:PanelGrid columns="4" border="2" frame="box" width="100%" columnClasses="colstyle" >
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Person Reporting Incident"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Person_Reporting_Incident__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Incident ID"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Name}"/>
  </apex:PanelGrid>
 
<apex:outputLabel style="font-style:bold; font-weight:bold; font-size:20px; font-family:Helvetica" value="Facility Information"/>
   
   <apex:PanelGrid columns="4" border="2" frame="box" width="100%" columnClasses="colstyle">
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Hospital Name"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Hospital_Name__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="City"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.City__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Account Number"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Account_No__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Street Address"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Street_Address__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Phone No"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Phone_No__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Country"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Country__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="E Mail Address"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.E_Mail_Address__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Post Code"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Post_Code__c}"/>
   </apex:PanelGrid>

<apex:outputLabel style="font-style:bold; font-weight:bold; font-size:20px; font-family:Helvetica" value="Sales Representative Information"/>
   
   <apex:PanelGrid columns="4" border="2" frame="box" width="100%" columnClasses="colstyle">
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="S&N Organisation"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.S_N_Organisation__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep Street Address"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_Street_Address__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep Phone No"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_Phone_No__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep City"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_City__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep E Mail Address"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_E_Mail_Address__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep Country"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_Country__c}"/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value=""/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value=""/>
<apex:outputlabel style="font-style:regular; font-weight:bold; font-size:10px; font-family:Helvetica" value="Sales Rep Post Code"/>
<apex:outputText style="font-style:regular; font-weight:regular; font-size:10px; font-family:Helvetica" value="{!Adverse_Incident__c.Sales_Rep_Post_Code__c}"/>
   </apex:PanelGrid>