Skip to main content
Known Participant
Jun 15, 2011 3:18 AM UTC
Answered

How do I find an inlineGraphicElement belongs to which Container ?

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 is closed to new replies. Start a new post to keep the conversation going.
Jin-HuangCorrect answer
Adobe Employee
Jun 15, 2011 4:01 AM UTC

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)

2 replies

Jin-HuangCorrect answer
Adobe Employee
Jun 15, 2011 4:01 AM UTC

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)

Translate
ASHandlerAuthor
Known Participant
Jun 15, 2011 5:02 AM UTC

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

Translate