+ Start a Discussion
hylim1215hylim1215 

how to remove header & footer after certain page in PDF VFP?

Hi,

I need help on my custom Quote Line Item Visualfoce render as PDF. I already header & footer for my page and i would like to remove the header & footer after my table ends. The idea is i want my last few page meant for Terms & Conditions and should not show header & footer.

this is my header & footer
 
@page {
                    margin: 25pt .5in .5in .5in;
                    margin-top:160px;
                    margin-bottom:180px;
                    
                
                        @top-center{
                            content: element(header);
                        }
                        @bottom-center{
                            content: element(footer);
                        }
                }


<div class="header">
                
                <table border="0" cellspacing="0" cellpadding="0" width="100%" id="tableHeader">
                    <tr>
                        <td class = "stdstyle" style="width:35%;font-size:20px;" >
                            QUOTATION
                        </td>
                        
                        <td class = "stdstyle" style="width:35%;font-size:20px;" colspan = "3" >
                        xxx company
                        </td>   
                    </tr>
                    <tr class = "stdstyle">
                        <td>&nbsp;</td>
                        <td >Address</td>
                        <td width = "1%">: </td>
                        <td >111</td>
                    </tr>  
                </table>
                <div class="pagging">Page <span class="pagenumber"/> of <span class="pagecount"/></div> 
            </div> 
        
        <div class="footer">
                <table border="0" cellspacing="0" cellpadding="0" width="100%" id="tableFooter">
                    <tr class = "stdstyle">
                        <td style="width:5%">Bank No</td>
                        <td >
                            information
                        </td>
                    </tr>
                    <tr><td>&nbsp;</td></tr>
                    <tr class = "stdstyle">
                        <td colspan = "2"><apex:image id="Logo" value="/servlet/servlet.FileDownload?file=015N0000000FFFF" width="70" height="70"/></td>
                        
                        <td style="text-align:right"><apex:image id="CO_Logo" value="/servlet/servlet.FileDownload?file=015N0000000FFFF" width="130" height="80"/></td>
                    </tr>
                </table>
            </div>
then i will have my quote line item displayed in table format so it can be few page more or 1 page depend how many items are there. After displaying all the items, i would like to remove header & footer for all the page after that as i will have another 3 last page 'Terms & Condition.

Please advise.

Thanks.