Copy link to clipboard
Copied
given textFrames[0] -- paragraphs[0] is the first paragraph on the current page
When that paragraph starts on the previous page, is there an easy way to know how many lines of that paragraph are on the previous page, and how many are on the current page?
I assume there's an easy/fast way -- I just can't find it...
Thanks
Given a paragraph myParagraph that breaks across two frames,
myParagraph.parentTextFrames[0].lines.itemByRange(myParagraph.lines[0], myParagraph.parentTextFrames[0].lines[-1]).lines.length
returns the number of lines in the first frame, and
myParagraph.parentTextFrames[1].lines.itemByRange (myParagraph.parentTextFrames[1].lines[0], myParagraph.lines[-1]).lines.length
the number of lines in the second frame.
Peter
Copy link to clipboard
Copied
Given a paragraph myParagraph that breaks across two frames,
myParagraph.parentTextFrames[0].lines.itemByRange(myParagraph.lines[0], myParagraph.parentTextFrames[0].lines[-1]).lines.length
returns the number of lines in the first frame, and
myParagraph.parentTextFrames[1].lines.itemByRange (myParagraph.parentTextFrames[1].lines[0], myParagraph.lines[-1]).lines.length
the number of lines in the second frame.
Peter
Copy link to clipboard
Copied
Brilliant. Thanks