0

I have the below visualforce page. I need to move the last section of text to the footer of the PDF document. Although there are similar threads, I have not been able to get mine to work.

<apex:page standardController="Opportunity" renderAs="pdf">

    <div style="font-family:sans-serif; font-size:14px; width: 100%; float: left; box-sizing: border-box;">
        <div style="float: left; width: 100%; margin-bottom: 20px;">
            <div style="float: left; width: 50%;">
                <apex:image url="{!$Resource.Logo}" rendered="true" width="200" height="35" />
            </div>
            <div style="float: right; text-align: right; width: 50%;">

                <div style="font-weight:bold; margin: 10px 0;">Lexington Medical, Inc.</div>
                <div>617-209-9817<br/>
                    1 Drive<br/>
                    MA 010000<br/>
                </div>
            </div>
            <div style="clear: both;"></div>
        </div>

        <div style="float: left; width: 100%;">
            <div style="float: left; width: 50%;">
                <div style="float: left; width: 100%; margin: 5px 0;">
                    <div style="float: left; text-align: center; width: 50%; font-weight: bold;">
                        <apex:outputText value="Prepared for:"></apex:outputText>
                    </div>
                    <div style="float: left; width: 100%; margin-left: 3%;">
                        <apex:outputText value="{!Opportunity.Account.Name}"></apex:outputText>
                    </div>
                </div>

      <div style="float: left; width: 100%;">
            <div style="font-weight: bold; margin-bottom: 10px;"></div>                



              </div>
                </div>
            </div>
        </div>

        <div style="float: left; width: 100%;">



        </div>
        <div style="clear: both;"></div>

 <table width="100%" class="table-bordered" style="border: 1px solid black;border-collapse: collapse;margin-top:10px">
            <thead>
                <tr style = "line-height: 16px;background-color: #ccc;">


                    <th style = "border: 1px solid black;text-align: center;font-size:14px;">Product Code</th>
                    <th style = "border: 1px solid black;text-align: center;font-size:14px;">Description</th>
                    <th style = "border: 1px solid black;text-align: center;font-size:14px;">List Price</th>


                </tr>
            </thead>
            <tbody>
                <apex:repeat value="{!Opportunity.OpportunityLineItems}" var="cx">
                   <!-- class="table_tr_td"-->
                   <tr style="{!IF(cx.Name == 'Shipping and Handling','display:none', '')}">
                    <td style = "width:20%;border: 1px solid black;padding: 5px;text-align: center;font-size:14px;">{!cx.ProductCode}</td>


                        <td style = "width:15%;border: 1px solid black;padding: 5px;text-align: center;font-size:14px;"> {!cx.Product2.Description} </td>
                        <td style = "width:15%;border: 1px solid black;padding: 5px;text-align: center;font-size:14px;">{!cx.UnitPrice}
                        </td>


                    </tr>

                </apex:repeat>
                <tr>

                    <td style = "width:0%;border: 0px solid black;padding: 5px;text-align: center; font-size:12px;">


                    </td>
                </tr>
            </tbody>
        </table>

 <div style="float: left; width: 100%; margin-top: 40px;">
            <p style="margin-bottom: 20px; line-height: 22px; letter-spacing: 1px;"><strong>Wire Transfer Payment Details</strong>: Name on </p>
            <p style="line-height: 22px; letter-spacing: 1px;">Thanks for providing us the opportunity to do business with you. Please feel free to contact us at cfor any questions or concerns about this invoice.</p>
        </div>


</apex:page>
2
  • 1
    What do you mean by a footer - are you trying to float that element to the bottom of one page, to the bottom of each page - can you be specific? What did you try so far? – David Reed Jan 8 '20 at 22:07
  • 1
    there is a specific help document covering this. I'd start with that and then selectively add in the rest of your rendering – cropredy Jan 9 '20 at 5:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.