Generelly, you have to define a complex page-master using repeatable-page-master-alternatives and conditional-page-master-reference. You can find examples in the examples/fo/pagination directly. The text is then added as children to static-content elements.
On 30.08.2006 19:14:08 Felipe Villarinho wrote: > Hello, > > I need to display in the footer of a document different sentences depending > on which page it is. > For exemple, > 1. if it is the last page of the document show "Last Page" This is addressed by using page-position="last" on the conditional-page-master-reference. Please note that this is only available in the latest code directly from the Subversion repository (FOP Trunk) and may not yet work in every case. It's a new feature which has not been widely tested and I know there are still a few problems. > 2. if it is not the last page show "Continue..." You'd write that in a static-content element for a footer that's on a simple-page-master which is not used for page-position="first" or page-position="last". > 3. if it is the first and only page show "This Document Has Only One Page" That's where page-position="only" is used. But this is only available since XSL 1.1 and this feature has not been implemented, yet, in FOP. > Using markers I did 1 and 2 but I can't figure a way of doing 3. Ok, markers is probably another way to do it, but page-position="only" would be the right way. But since that's not available, yet, you'd have to take a work-around. Either you know yourself from the amount of text if you get beyond the first page, or you have to take a two-phase approach. In the first step, you simply render the document to know how many pages you get and then you render it again and write a different text depending on the number of pages that are expected. > Does Anybody knows how to do it? Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
