Header And Footer:
This example shows how to include header and footer in pdf page.The following visualforce can be use for image header if you remove the comments and upload an image into your static resources.
HeaderFooter Visualforce Page:
<apex:page renderAs="pdf" >
<head>
<style>
@page {
margin : 70pt .5in .5in .5in;
@top-center {
content : "My Header";
}
@bottom-left {
content : "My Footer on Left Side";
font-size : 10 px;
color : #808080;
}
@bottom-center {
content : "My Footer in center" ;
font-size : 10 px;
color : #808080;
}
/*
@top-center {
content : element(header);
}
div.header {
position : running(header) ;
}*/
}
</style>
</head>
<!--
<div class="header">
<apex:image url="{!$Resource.TestImage}" width="50" height="50"/>
</div> -->
<body>
<!-- Begin Default Content REMOVE THIS -->
<h1>Congratulations</h1>
This is your new Page with header and footer
<!-- End Default Content REMOVE THIS -->
</body>
</apex:page>
No comments:
Post a Comment