You need to sign in to do that
Don't have an account?
hoffmann1.39658926698286E12
Configuration Visualforce PDF - Header and Footer for each page with one apex code
I have one apex code <apex:outputfield value="{!pba__Listing__c.Object_description__c}"></apex:outputfield>. The content of this code will always have a diffrent length and goes over 1-3 pages. So its defined as one big body. I want to define the header and footer for each page.
But I cannot figure out how to define this apex code that it finishes at the bottom of each page.
All submissions I give in for header and footer are just shown up at the first page and on the last page. But not for the pages in the middle. I tried already several instructions to define it but the header and footer always float over the content in the apex code or the other way around.
Any suggestions how I can solve my problem?
But I cannot figure out how to define this apex code that it finishes at the bottom of each page.
All submissions I give in for header and footer are just shown up at the first page and on the last page. But not for the pages in the middle. I tried already several instructions to define it but the header and footer always float over the content in the apex code or the other way around.
Any suggestions how I can solve my problem?
This is my code:
<apex:page standardController="pba__Listing__c" extensions="pba.RecommendationEmailSingleListing" renderAs="pdf" showHeader="true">
<html>
<head>
<style type="text/css">
</style>
</head>
<body style="margin-bottom: 30px; font-family: Arial Unicode MS;"></body>
<div id="header_container">
<div id="header">
<div style="position:absolute; top: 1em; left:74%; high:50 px; margin:5px; width:100%; height:50px; margin-bottom:5px;"><img src=" https://c.eu2.content.force.com/servlet/servlet.Image.. "></img></div>
</div></div>
<div id="content">
<div style="background-color:white; margin-top:70px; high:100%; width:100%;">
<p class="pDate" style="text-align: right; font-size: 16px;"><span style="font-size: small;"><span style="font-size: medium;"><span style="font-family: arial, helvetica, sans-serif;">{! pba__Listing__c.Date__c }</span></span></span></p>
<br></br>
<p style="text-align: left;"><span style="font-size: xx-large;"><strong><span style="font-family: arial, helvetica, sans-serif;">{! pba__Listing__c.Name }</span></strong></span></p>
<br></br><br></br>
<table style="margin-bottom: 10px;">
<tr>
<td> <p style="text-align: left;"><span style="font-size: 24px;color:#005088;"><strong><span style="font-family: arial, helvetica, sans-serif;">{!pba__Listing__c.Subtitel__c}</span></strong></span></p>
</td>
<td style="margin-right: 100px; ">
<div class="divMainImg">
<apex:image url="{!mainImage.pba__URL__c}" styleClass="imgMainImg" style="width: 450px; float:right"/>
</div>
<div style="margin-right: 15px;"> </div>
</td>
</tr>
</table>
<br></br>
<div class="divObject_description"><span style="font-family: arial, helvetica, sans-serif ; padding-top:10px; margin-top: 90px; margin-bottom:30px;"><br /> <apex:outputfield value="{!pba__Listing__c.Object_description__c}"></apex:outputfield></span></div>
<div class="divImagesWrapper" >
<apex:variable var="cnt" value="{!1}" />
<apex:repeat value="{!images}" var="image">
<div class="divSmallImg" style="display:{!IF(cnt > 9,'none','inline-block')}; Padding-top:10px; margin-right: 10px; margin-left: 30px; margin-top:20px; margin-bottom: 20px;">
<apex:image styleClass="imgSmallImg" url="{!image.pba__MidresURL__c}" style="width: 300px;"/>
</div>
<apex:variable var="cnt" value="{!cnt + 1}" />
</apex:repeat>
</div>
<br></br><br></br>
<br></br><br></br>
<div id="footer_container">
<div id="footer">
<br><span style="position:fixed; left:8%; bottom:0px; font-family: arial, helvetica, sans-serif; font-size: 12px; color: #808080;">Red Square Properties • Ul. Bolshaya Dmitrovka 23/1, 6<sup>th</sup> floor • 125009 Moscow, Russia • www.red-square.com </span></br>
<div>
</div>
</div></div></div></div></html></apex:page>