Alexander Dyuzhev created FOP-3305:
--------------------------------------
Summary: Accessible PDF with repeated internal-destination links
has incorrect document structure
Key: FOP-3305
URL: https://issues.apache.org/jira/browse/FOP-3305
Project: FOP
Issue Type: Bug
Reporter: Alexander Dyuzhev
Attachments: fop.xconf, screenshot.png, test_internal_destination.fo,
test_internal_destination.pdf
This issue is similar https://issues.apache.org/jira/browse/FOP-2868 (fixed),
but occurs when there are two or more {{fo:basic-link}} with
{{{}internal-destination{}}}.
{{How to repeat: fop test_internal_destination.fo -c fop.xconf out.pdf}}
In the Tags tree, the link after 3 doesn't have the {{Link - OBJR}} entry, but
the link after 4 has two {{{}Link - OBJR{}}}, which relate to the both 3 and 4
links.
The {{fo:basic-link}} 1 and 2 with {{external-destination}} provided just to
show the correct behavior.
I think the issue somewhere in the module
{{{}org\apache\fop\render\intermediate\IFRenderer.java'{}}}. The method
{{getGoToActionForID}} for the second link returns the {{GoToXYAction}} from
the {{actionSet}} list (contains first link {{{}GoToXYAction{}}}):
{code:java}
GoToXYAction action = (GoToXYAction)actionSet.get(targetID);
{code}
But in the method {{{}renderInlineParent{}}}, the {{structureTreeElement}} is
changing for the object {{action}} that uses in both {{link}} in the list
{{{}deferredLinks{}}}:
{code:java}
if (linkTraitFound) {
StructureTreeElement structElem
= (StructureTreeElement)
ip.getTrait(Trait.STRUCTURE_TREE_ELEMENT);
action.setStructureTreeElement(structElem);
Link link = new Link(action, ipRect);
this.deferredLinks.add(link);
{code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)