You could do this the same way pagination works with typical Visualforce. The easiest way to setup pagination is to utilize the StandardSetController and it's prev/next methods. Here's an article on how you could accomplish this with a Visualforce page: http://blog.jeffdouglas.com/2009/07/14/visualforce-page-with-pagination/ You should be able to do the same with your template.
Please check below post for Pagination i hope that will help you
Pagination using standardsetcontroller in salesforce
http://amitsalesforce.blogspot.in/2015/04/pagination-using-standardsetcontroller.html
Pagination with Wrapper Class ( with maintaing the state of selected records)
http://amitsalesforce.blogspot.in/2014/11/pagination-with-wrapper-class-with.html
Please let us know if this will help you
Thanks ,
Amit Chaudhary
All Answers
Please check below post for Pagination i hope that will help you
Pagination using standardsetcontroller in salesforce
http://amitsalesforce.blogspot.in/2015/04/pagination-using-standardsetcontroller.html
Pagination with Wrapper Class ( with maintaing the state of selected records)
http://amitsalesforce.blogspot.in/2014/11/pagination-with-wrapper-class-with.html
Please let us know if this will help you
Thanks ,
Amit Chaudhary
Thanks for your response. please can you let me know can we do pagination in visualforce email template
Regards
Dilip
we can do pagination in visualforce template by following code and also putting header on diffrent pages
<style type="text/css" media="print,screen">
@page {
counter-increment:pages;
@bottom-center{
content: element(header);
content: element(footer);
}
}
div.footer{
position :running(footer);
}
#pageNum:before
{
content: counter(page) "/" counter(pages);
}
div.header
{
padding: 10px;
position: running(header);
}
table {
border-collapse: collapse;
-fs-table-paginate: paginate;
thead
{
display:table-header-group;
}
tbody
{
display:table-row-group;
}
}
</style>