I am trying to add information dynamically in the ...
# advancedpdf
v
I am trying to add information dynamically in the header of an Advanced PDF template using a loop. However, I am unable to display data specific to each page correctly. How can I ensure that only the relevant data for the current page is added to the header? Any guidance or examples would be greatly appreciated. Thanks!
Copy code
<?xml version="1.0"?>
<!DOCTYPE pdf PUBLIC "-//big.faceless.org//report" "report-1.1.dtd">
<pdf>
<head>

 <#assign salesOrders = salesOrders?eval />
<#list salesOrders.salesOrders as order>

                <tr>        
                    <td colspan="1"></td>
                    <td colspan="2" align="left">Date: ${order.trandate}</td>
                </tr>

                 <tr>
                  <td colspan="1"></td> 
                  <td colspan="2" align="left">Order: ${order.tranid}</td>
                </tr>

				<tr>
                    <td colspan="1"></td>                          
                    <td colspan="2" align="left"><pagenumber/> of <totalpages/></td>
                </tr>

                 </#list>

</head>
<body>
 <#assign salesOrders = salesOrders?eval />
    <#list salesOrders.salesOrders as order>
</#list>
</body>
</pdf>
g
try searching in the bfo pagebreak… you can use that tag and can specify the header and footer for the page