Hi Jay,

> That was right. I have corrected it by making the following change
> to org.apache.fop.render.pdf.PDFRenderer: When the renderer
> processes a PDFDestination, it adds a PDFGoTo and makes the
> PDFDestination refer to the GoTo object.
> I've tested it on my web site. If you want to see it work, go to
> http://www.bryantcs.com/fop/test, open link-test.pdf, and click
> "Link test" (the only text on the page). It opens test.pdf to the
> second page because the destination named block2 is on the second
> page.

It works fine. But there's a problem if the target document contains
multiple fox-destinations and they don't happen to be created in
lexicographical order. If the /Limits are in the wrong order, most of
the destinations don't work.

I suppose this can be solved by making PDFdocument.destinations a
SortedSet instead of a List, and add a compareTo method to
PDFDestination which simply returns the compareTo result on the
respective idRefs.

This will also make sure that the PDFLimit's /Kids are ordered by
destination name (although you don't see those names in the /Kids

Kind regards,
Paul Vinkenoog

Reply via email to