function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
SFDC_LearnerSFDC_Learner 

PDF - Footer

Hi I have created a component with a specific format.

 

And i generated a pdf that contains 10 pages.

 

How can i attach my component as a footer to all the pages in the PDF?

 

 

I tried different samples from google, and could not find this.

prakash_sfdcprakash_sfdc
Try this:
<style>
@page
{
margin-top: 2cm;
margin-bottom: 2cm;



@top-center
{
content: element(header);
}

@bottom-center
{
content: element(footer);
}

}

div.headerpdf
{
position: running(header);
}

div.footerpdf
{
position: running(footer);
}
</style>

<div class="headerpdf">

<div >
<apex:image url="{!URLFOR($Resource.Header)}"/>
</div>
</div>
<div class="footerpdf">

<div>
<center><apex:image url="{!URLFOR($Resource.Footer)}" "/></center>
</div>
</div>

<div class="content">
page content
</div>

Please give kudos if it helps.

Cheers!
SFDC_LearnerSFDC_Learner

And one more.

 

Assume that,

I am having 500 records in a list variable. and im showing the data in a page with renderas=pdf stuff.

 

I am showing this data from the second page onwards. Bcz The first page is having some other headings and other design.

 

Suppose if the second page can hold 20 records i would like to show a header at left side "Records 1-20".

 

For the third page it would be like 20 - 38 ( if it holds 18 records).... like this based on the data that the page holdsi need

to show the header.

 

 

Any Idea!

 

 

prakash_sfdcprakash_sfdc
Hi,

Please refer this link, it will help you to achieve your requirement
http://wiki.developerforce.com/page/Creating_Professional_PDF_Documents_with_CSS_and_Visualforce

Please give kudos if it helps.

Cheers!