I created pdf file using visualforce renderAs. In visualforce I have a table tr in apex:repeat and below that table one DIV tag. This div tag appears at bottom of the page when there is content only in single page. But when content going out of first page(content in td) I want DIV tag at bottom of second page only not for first page. I have following code:
<apex:page showHeader="false" renderAs="pdf" applyhtmltag="false" applyBodyTag="false" standardController="Opportunity" extensions="Invoice_PDF_Controller" action="{!doDmlht}">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
<style type="text/css" media="print">
@page {
border: 2px solid black;
@top-center {
content: element(header);
}
@bottom-left {
content: element(footer);
}
}
div.header {
padding: 10px;
/*margin-top: 50px*/
position: running(header);
}
div.footer {
display: block;
padding: 0px;
position: running(footer);
}
.pagenumber:before {
content: counter(page);
}
.pagecount:before {
content: counter(pages);
}
</style>
</head>
<body>
<div>
<table>
<apex:repeat>
<tr>
<td>some content..</td>
</tr>
</apex:repeat>
</table>
<div style="position: fixed;bottom: 0;">
some content..
</div>
</div>
</body>
</html>
I used style="position: fixed;bottom: 0;"
for last div but it also appears for first page. I tried many ways but not use.