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
Andy Kallio 7Andy Kallio 7 

Admin wants to make a visualforce templates

Hello. I am playing around with rendering as PDF capability. I have created my first page and now I have other use cases for all of which I would like to use the same basic layout which is basically a two column layout with a footer. I have read the documentation on using <apex:composition>  <apex:insert> and <apex:define> but I am having a hard time seeing how to apply it to my template. 

 

So, here's hopin that someone out there sees this and has done it before and can give some pointers. 

 

Here's what my template would look like: 

 

<apex:page >
            
    
    
    <apex:stylesheet value="{!$Resource.ppPDFStyles}"/>

    <!-- All Pages Footer -->
   
    <c:pdfHeaderFooter type="footer" position="left" >
        <apex:image url="{!URLFOR($Resource.ppLogos,'/ppLogo3/Pureprofile-logo-horizontal-RGB.png')}" width="121" height="29" styleClass="columnFooterLeft"/>
        <apex:outputLabel value="Pureprofile" styleClass="footerBold columnFooterLeft"/> 
        <apex:outputLabel value="ABN 37 167 522" styleClass="footerLight columnFooterLeft"/> 
        <apex:outputLabel value="www.pureprofile.com" styleClass="footerLight columnFooterLeft"/> 
        <apex:outputLabel value="info@pureprofile.com" styleClass="footerLight columnFooterLeft"/> 
    </c:pdfHeaderFooter>
    <c:pdfHeaderFooter type="footer" position="center" >
            <apex:outputLabel value="Sydney" styleClass="footerBold columnFooterCenter" /> 
            <apex:outputLabel value="Melbourne" styleClass="footerBold columnFooterCenter"/>  
            <apex:outputLabel value="London" styleClass="footerBold columnFooterCenter" />  
            <apex:outputLabel value="New York" styleClass="footerBold columnFooterCenter" />  
            <apex:outputLabel value="Thessaloniki" styleClass="footerBold columnFooterCenter"/>  
            <apex:outputLabel value="Mumbai" styleClass="footerBold columnFooterCenter"/> 
    </c:pdfHeaderFooter>
    <c:pdfHeaderFooter type="footer" position="right" showPageNumbers="true" />
    
    <table width="100%">
        <tr width="100%">
            <td class="columnleft column"> 
                <apex:image url="{!URLFOR($Resource.ppLogos,'ppLogo3/pp-line-dot2.png')}" style="padding-top: 9px"/>
            </td>
            <td class="columnright column">
               
                
                        
            </td>
        </tr>
        
    </table>
   
    
</apex:page>