Right. I forgot that the AreaTreeModel keeps track of the page sequences.

On 27.07.2005 21:41:27 Simon Pepping wrote:
> Don't AreaTreeModel.getPageSequenceCount() and
> AreaTreeModel.getPageCount(int seq) do this? AreaTreeHandler.model is
> the AreaTreeModel object.
> 
> Simon
> 
> On Wed, Jul 27, 2005 at 08:43:50AM +0200, Jeremias Maerki wrote:
> > Manuel,
> > 
> > thanks for grabbing this. I think the easiest thing will be to recreate
> > what was in 0.20.5. It doesn't offer very much and I have a better
> > overall mechanism in mind (as a long-term solution) but for the moment
> > it is easiest to do that. Here's what I would do:
> > - Copy over FormattingResults and PageSequenceResults over from 0.20.5
> > and replace the license header with the once you find all over FOP Trunk.
> > - Go to org.apache.fop.area.AreaTreeHandler.endPageSequence() and build
> > up the FormattingResults structure as it's done in 0.20.5 in
> > StreamRenderer. AreaTreeHandler is more or less the old StreamRenderer.
> > - When endPageSequence() is called you can probably derive the number of
> > pages generated for a page-sequence by subtracting currentPageNumber
> > from startPageNumber in layoutmgr.PageSequenceLayoutManager.
> > - Find a way to access the FormattingResults structure in Fop.java like
> > it was done in 0.20.5.
> > 
> > As an alternative to doing this in AreaTreeHandler you might want to
> > investigate fo.Root and fo.PageSequence but I'd prefer to have stuff
> > like that in AreaTreeHandler.
> > 
> > I hope that gives you some hints to do this. It shouldn't really be that
> > hard.
> > 
> > On 27.07.2005 08:13:58 Manuel Mall wrote:
> > > Jeremias,
> > > 
> > > happy to do so - I just setup Fop under NetBeans 4.1.
> > > 
> > > However, where do I start for something like this?
> > > 
> > > Manuel
> > > 
> > > PS: I moved this thread over to fop-dev as I assume its more appropriate
> > > here.
> > > 
> > > -----Original Message-----
> > > From: Jeremias Maerki [mailto:[EMAIL PROTECTED]
> > > Sent: Wednesday, 27 July 2005 14:08
> > > To: fop-users@xmlgraphics.apache.org
> > > Subject: Re: getPageCount and FOP 1.0dev
> > > 
> > > 
> > > No, but you're welcome to help improve the situation. :-)
> > > 
> > > On 27.07.2005 03:50:46 Manuel Mall wrote:
> > > > Jeremias post on fop-dev suggesting to push for a release made me 
> > > > curious
> > > to
> > > > check out if the new trunk code will work with our application.
> > > Downloading
> > > > it with subversion and building it with ant was not a big problem (These
> > > > things never seem to be 100% straightforward). Some of the interfaces 
> > > > have
> > > > changed and what was ...apps.Driver is now sort of ...apps.Fop. Not 
> > > > such a
> > > > big deal especially as examples exist, just a nuisance if you only want 
> > > > to
> > > > see if the new trunk code works with what we have got as it means code
> > > > changes to existing code. However I am stuck with how to replace the old
> > > > <driver>.getResults().getPageCount(). Is there something equivalent in
> > > > 1.0dev?
> > > 
> > > 
> > > Jeremias Maerki
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> > Jeremias Maerki
> > 
> 
> -- 
> Simon Pepping
> home page: http://www.leverkruid.nl



Jeremias Maerki

Reply via email to