You simply run FOP twice. There's two possibilities to approach that: 1. If you're doing this in Java, you can retrieve the number of pages generated through the Fop object. See http://xmlgraphics.apache.org/fop/0.92/embedding.html#render-info for more info.
2. In the first run, you can generate Area Tree XML (-at on the command-line) instead of PDF (or whatever you generate). By inspecting the generated XML file you can find out how many pages were produced. This probably won't work reliably in 0.20.5. For 0.92beta and later it's a good idea to set the "mimic renderer" so you get the same page breaks as with the original renderer. More info on the area tree XML aka. intermediate format: http://xmlgraphics.apache.org/fop/0.92/intermediate.html For the second run, you have to pass the number of expected pages into your XSLT stylesheet so it can react as necessary. HTH On 31.08.2006 15:34:19 Felipe Villarinho wrote: > On 8/31/06, Jeremias Maerki <[EMAIL PROTECTED]> wrote: > > > > 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. > > > > > How can I do this two-phase approach? Jeremias Maerki --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
