Dear Raman, Adding the total page count (so we can have 'Page 3 of 5') is a two step process, based on the use of the 'id' attribute which uniquely identifies an XML element.
We put a block on the last page with the id of 'last-page', and then we use the page-number-citation element to get the number of that page as our total number of pages. Typically the block with the id of 'last-page' is empty so we can move it if required without disturbing the document text. The XML for the last block in the document looks like this: <fo:block id='last-page'/> And the XML to retrieve the last page number and put it in the footer looks like this: <fo:page-number-citation ref-id='last-page'/> You can see how the id and ref-id values match. This is how XSL-FO associates the two elements and knows which block to retrieve the page number from. Find attached sample coding for to get the total page number. <?xml version='1.0' encoding='UTF-8'?> <fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format"> <fo:layout-master-set> <fo:simple-page-master master-name="simple" margin='2.5cm'> <fo:region-body margin="2.5cm" margin-bottom='1cm' region-name="body" background-color='#eeeeee'/> <fo:region-after extent='1cm' region-name="footer" background-color='#dddddd'/> <fo:region-start extent='2.5cm'/> <fo:region-end extent='2.5cm'/> </fo:simple-page-master> </fo:layout-master-set> <fo:page-sequence master-reference="simple"> <fo:static-content flow-name="footer"> <fo:block text-align='center'> Page <fo:page-number/> of <fo:page-number-citation ref-id='last-page'/> </fo:block> </fo:static-content> <fo:flow flow-name="body"> <fo:block>Hello World</fo:block> <fo:block id='last-page'/> </fo:flow> </fo:page-sequence> </fo:root> Regards, Srinivasan -----Original Message----- From: Subbiah [mailto:[EMAIL PROTECTED] Sent: Sunday, August 01, 2004 8:06 AM To: [EMAIL PROTECTED] Subject: Page Numbers I know how to get page numbers <fo:page-numbers/> How to get pagenumbers in the format "Page 1 of 3" regards, raman --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]