Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Get location of page break in paragraph

Explorer ,
Mar 19, 2017 Mar 19, 2017

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

TOPICS
Scripting
442
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Mar 19, 2017 Mar 19, 2017

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

Translate
Community Expert ,
Mar 19, 2017 Mar 19, 2017

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Mar 19, 2017 Mar 19, 2017
LATEST

Brilliant. Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines