I've just fixed the bug. I did it by adding a simple ID generator to
AreaTreeHandler that makes sure we have unique IDs for all pages.

http://svn.apache.org/viewcvs?rev=396640&view=rev

Note: If multiple intermediate format files are concatenated unchanged
to a larger PDF, the basic links will still end up wrong since the keys
generated are not globally unique, only unique within the same
AreaTreeHandler. Shouldn't be a problem for most use cases, though. Just
noting this as a reminder in case anyone stumbles on this in the future.


On 24.04.2006 18:35:26 Jeremias Maerki wrote:
> It's a bug. The problem seems to be PageViewport.getKey() which uses
> toString() to build a unique key for the page. When there are multiple
> page-sequences that generate the same page number strings, the
> uniqueness is not given anymore.
> 
> I've tried to use getPageIndex() instead but that's not good because
> setPageIndex() is set too late (after the page is generated and ready to
> be rendered). It looks like we need to find a way to generate a unique
> ID for the PageViewport. Good ideas welcome.
> 
> On 24.04.2006 17:24:57 kralik wrote:
> > 
> > During transformation from xml and xsl to PDF, I found strange behavior of
> > FOP Trunk. 
> > FO file seems to be OK, but in result - first two links in PDF Bookmarks
> > (Uvod and Uvod do XML) and first two links in Content (Obsah in Czech) at
> > the end of the document show another place, I expected.
> > Maybe it's a bug.
> > My FO file:
> > http://laduska.ic.cz/diplomka/diplomkaTrunk.fo 
> > 
> > Any idea?
> > 
> > Thanks for your help, Pavel Tyl


Jeremias Maerki


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

Reply via email to