Quantcast
Channel: Adobe Community: Message List - InDesign Scripting
Viewing all articles
Browse latest Browse all 37788

Re: Page Number of a Search Result

$
0
0

@Gavin – instead of the name property (which value might not be unique ! ), you could use the zero-based documentOffset property together with parentPage…

 

$.writeln (found_words[0].parentTextFrames[0].parentPage.documentOffset);

 

There are also "special cases", where, geometrically spoken, you'll get the wrong page:

 

1. A table exceeds a page in double sided document:

 

TableExceedsAPage.png

 

2. Or here a text frame with its center on page 3:

 

TextFrameCenteredOnPage3.png

 

If you want the geometrical position of your text, you have to refine your method ;-)

 

3. Also choose your sample of text wisely.

A word could always have more than just one parent text frames ( a hyphenated word over one or more threaded text frames ).

 

Also consider text on paths…

 

Uwe


Viewing all articles
Browse latest Browse all 37788

Trending Articles



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