Skip to main content
Known Participant
June 15, 2011
Answered

How do I find an inlineGraphicElement belongs to which Container ?

  • June 15, 2011
  • 1 reply
  • 518 views

Say I have got three text containers (each has it's own containerController), and each text containers may have several inline images inside, now if I have got a handle of the inlineGraphicElement reference, could I find which text container this inlineGraphicElement belongs to ?

or vice versa, is there a way find all inlineGraphicElements within one containerController ?

thanks.

This topic has been closed for replies.
Correct answer Jin-Huang

If you have already got the instance of an inlineGraphicElement in the textflow, just compare the absoluteStart of the InlineGraphicElement to that of each container.(get "absoluteStart" of each containers through ContainerControllor )

If you want to got all the inlineGraphicElements in the textflow,

textflow.getFirstLeaf(), leaf.getNextLeaf() and if(leaf is InlineGraphicElement)

1 reply

Jin-HuangCorrect answer
Adobe Employee
June 15, 2011

If you have already got the instance of an inlineGraphicElement in the textflow, just compare the absoluteStart of the InlineGraphicElement to that of each container.(get "absoluteStart" of each containers through ContainerControllor )

If you want to got all the inlineGraphicElements in the textflow,

textflow.getFirstLeaf(), leaf.getNextLeaf() and if(leaf is InlineGraphicElement)

ASHandlerAuthor
Known Participant
June 15, 2011

Great, worked like a champ, thanks for the quick reply.