No, you don't need an additional tool, only some custom Java code and
probably an extension to your stylesheet.

Step 1:
Use the Driver.getResults() method to determine the number of pages
generated during the first, normal run. See here for more info:
http://xml.apache.org/fop/embedding.html#render-info

Step 2:
You run FOP again with the same input file but now you set a parameter
to your XSLT stylesheet which generates the necessary number of blank
pages with normal XSL-FO means (page-sequences or page breaks or
whatever).

So you simply run FOP twice with the same input file and the same
stylesheet. You only need to extend your stylesheet so it can produce an
number of empty pages as specified through an XSLT parameter.

On 22.08.2005 15:39:11 Prakash R wrote:
> Jeremias,
> 
> When you said a two-pass approach, would that be both
> through FO processor or would I have to do the second
> run with some other tool? At the end of the first run
> I would have a PDF. If I would be using FO Processor
> for the second run then how would I go about doing the
> second run? If not, what are some other tools which I
> can use to do the second run? 
> 
> Thank you.
> Prakash
> 
> --- Jeremias Maerki <[EMAIL PROTECTED]> wrote:
> 
> > I don't think such a thing is directly possible with
> > XSL-FO. Your best
> > chance is probably to do a two-pass approach, noting
> > the number of
> > generated pages in the first run and then injecting
> > additional blank
> > pages in the second run.
> > 
> > On 20.08.2005 06:32:59 Prakash R wrote:
> > > Hi,
> > > 
> > > I'm new to FO. I'm developing a FO document to
> > > generate a catalog which has multiple sections. I
> > have
> > > a constraint on the length of each of these
> > sections.
> > > It has to be a multiple of 16 pages. If the data
> > for a
> > > particular section is less than a multiple of 16
> > pages
> > > then the extra pages need to be blank pages or
> > notes
> > > pages with rules. eg. a section is 14 pages of
> > data
> > > then it should be followed by 2 blank pages to
> > make it
> > > 16 pages. another section is 25 pages of data then
> > it
> > > should be followed by 7 blank pages to make it 32
> > > pages. This is almost like force-page-count=16*x.
> > > 
> > > First of all I would like to know if this is
> > possible.
> > > If so, I would appreciate any pointers to get it
> > done.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to