You need to sign in to do that
Don't have an account?
Manuel Echeverria
renderAs pdf is not working with the footer at the bottom
Hi.
I'm new in Salesforce but I have a quote that I need to show as a PDF with a header and a footer but just in the last page. Actually is working with renderAs="pdf" But is not showing the footer at the bottom of the page, it show it where it end (it could be at the beggining, middle or end). However if I don't write renderAs="pdf", it works fine but just as HTML page.
I made a simple dummy that you can edit writting and deleting the renderAs="pdf" to see the issue.
Any help would be really apprecciate it.
This is the dummy:
<apex:page renderAs="pdf" applyHtmlTag="false" showHeader="false" sidebar="false" readOnly="true" >
<html>
<head>
<style>
html,
body {
margin:0;
padding:0;
height:100%;
}
#wrapper {
min-height:100%;
position:relative;
}
#header {
padding:10px;
background:#5ee;
}
#content {
padding:10px;
padding-bottom:80px; /* Height of the footer element */
}
#footer {
width:100%;
height:80px;
position:absolute;
content : "My Footer on right Side";
bottom:0;
left:0;
background:#ee5;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="header"></div>
<div id="content"></div>
<span>
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
</span>
<div id="footer"> content : "My Footer on right Side";</div>
</div>
</body>
</html>
</apex:page>
I'm new in Salesforce but I have a quote that I need to show as a PDF with a header and a footer but just in the last page. Actually is working with renderAs="pdf" But is not showing the footer at the bottom of the page, it show it where it end (it could be at the beggining, middle or end). However if I don't write renderAs="pdf", it works fine but just as HTML page.
I made a simple dummy that you can edit writting and deleting the renderAs="pdf" to see the issue.
Any help would be really apprecciate it.
This is the dummy:
<apex:page renderAs="pdf" applyHtmlTag="false" showHeader="false" sidebar="false" readOnly="true" >
<html>
<head>
<style>
html,
body {
margin:0;
padding:0;
height:100%;
}
#wrapper {
min-height:100%;
position:relative;
}
#header {
padding:10px;
background:#5ee;
}
#content {
padding:10px;
padding-bottom:80px; /* Height of the footer element */
}
#footer {
width:100%;
height:80px;
position:absolute;
content : "My Footer on right Side";
bottom:0;
left:0;
background:#ee5;
}
</style>
</head>
<body>
<div id="wrapper">
<div id="header"></div>
<div id="content"></div>
<span>
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE<br/>THIS IS AN EXAMPLE
</span>
<div id="footer"> content : "My Footer on right Side";</div>
</div>
</body>
</html>
</apex:page>