Hi all,

Great addition, I agree, but is it supposed to work? I tried it out
and although some new elements are generated in the PDF the
destinations don't work.

It's a small error: the PDFDestination class uses the reference to the
page object as its goToReference. What it should use is a reference to
a /Goto that jumps to the page in question.

There's also something wrong with makeLink(Rectangle2D rect, String
destination, int linkType, float yoffset) in PDFFactory. The following
line is commented out twice:

//String file = destination.substring(0, index + 4);

Both instances should be uncommented, and in the corresponding calls
to getGoToPDFAction (2 lines below), "destination" must be replaced
with "file".
Otherwise, Jay's destinations (once fixed) will be fine but they won't
ever be found by FOP-built external links.

The elements generated also look a little different than in 0.20.5,
and I'm not referring to the fact that currently we only reference
pages and not coordinates on pages.

As to that: I will probably submit my basic-links patch tomorrow. It
makes links and bookmarks land "on the spot". I'll also hook up the
named destinations to that mechanism.

I think I mistakenly committed an interim step in the project, but I'll have to check.

Also, I meant to mention that I only extended fo:block to recognize a destination child object, so destinations only work on blocks (so far). That was a limitation that worked for my client, but I should have mentioned it.

Sorry, folks.

Jay Bryant
Bryant Communication Services

Reply via email to