Quantcast
Channel: Adobe Community : Popular Discussions - InDesign Server Developers
Viewing all articles
Browse latest Browse all 20709

CS3 server - java : how to find the Page object (or number) of an identified element (like TextFrame

$
0
0
Hello everyone,
I want to know what's the best solution to find the Page object of an "Identified" element.
I do :

]iId = 123; //just an example
]TextFrame oTextFrame = oDocument.getIdentifiedChildTextFrame(iId);

Now I want to find the Page object that contains my "oTextFrame" object.
With the getParent() method it works (PageHelper.narrow works) but what about nested TextFrames (a TextFrame that contains another TextFrame). The parent of such TextFrames are going to be another TextFrame (and not the Page object), so the narrow fails.

In fact, the real question is : How to know the "real type" of an SObject or a VariableType ? (because, it seems narrow can "convert" anything into anything else, that's not really safe...)

Viewing all articles
Browse latest Browse all 20709

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>