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

Need InDesign Script for Overset text flow

Explorer ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

Hi All.

 

I need to script for overset text flow.

 

Please find the attached sample file and screenshot.

 

 

Thanks...

TOPICS
Scripting

Views

270

Translate

Translate

Report

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 , Apr 18, 2024 Apr 18, 2024

You don't need a script.

When you place text hold the Shift key when you click the loaded sursor to auto-flow the entire content, or hold the Alt/Opt key to flow one page/frame and leave the cursor loaded.

In your current situation, withthe text tool click the red plus sign in the outport of your frame that has the overset text to load the cursor, then proceed as above.

This is very basic and should be covered in any introductory InDesign training, and is certainly covered in the help files.

Votes

Translate

Translate
Community Expert ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

You don't need a script.

When you place text hold the Shift key when you click the loaded sursor to auto-flow the entire content, or hold the Alt/Opt key to flow one page/frame and leave the cursor loaded.

In your current situation, withthe text tool click the red plus sign in the outport of your frame that has the overset text to load the cursor, then proceed as above.

This is very basic and should be covered in any introductory InDesign training, and is certainly covered in the help files.

Votes

Translate

Translate

Report

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
Community Expert ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

@Peter Spier has the right answer for what you have shown and provided. If you are trying to learn about scripting, a given TextFrame object has a boolean .overflows property that can be checked. 

Votes

Translate

Translate

Report

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
Community Expert ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

@brianp311 

 

Isn't checking if Story overflows is a better way?

 

Votes

Translate

Translate

Report

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
Community Expert ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

@Robert at ID-Tasker Guess it depends on the use case. Typically when I'm engaged in overflow shenanigans without Smart Reflow, I'm use nextTextFrame and previousTextFrame properties to link things up. 

Votes

Translate

Translate

Report

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
Community Expert ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

@brianp311

 

But when working with text - you should work on Stories?

 

Checking TF in the middle is rather pointless? 

 

Not sure about performance gains, but checking ParentStory for overflow is more universal?

 

Votes

Translate

Translate

Report

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
Community Expert ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

When I get up these shenanigans, I usually know that the text frame I'm on is the last. A middle text frame that's already linked to next will not show as overflowed. Mostly I just rely on Smart Reflow though. 

Votes

Translate

Translate

Report

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
Community Expert ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

Also, usually I am iterating through unlinked TFs on a given page to see if any is overflowed, and act accordingly (a recent custom label project comes to mind). If we're iterating through TFs already, and we know they are unlinked, then going up to parent story to check overflow seems less efficient. 

Votes

Translate

Translate

Report

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
Community Expert ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

@brianp311

 

If you are 100% sure then yes.

 

Votes

Translate

Translate

Report

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
Community Expert ,
Apr 18, 2024 Apr 18, 2024

Copy link to clipboard

Copied

Ou have got the correct answer. But your document has no styles. It is important to use object, paragraph and charactr styles.

You should also consider to use primary text frames and layers.

Votes

Translate

Translate

Report

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 ,
Apr 26, 2024 Apr 26, 2024

Copy link to clipboard

Copied

Thanks for All

Votes

Translate

Translate

Report

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
Enthusiast ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

The correct answer works when adding new text. To find overset text after the fact, I made a script to help:

https://www.marspremedia.com/software/indesign/resolve-overset-text

 

William Campbell

Votes

Translate

Translate

Report

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
Community Expert ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

@willcampbell7

 

You shouldn't be iterating through TextFrames collection - but Stories collection.

 

Votes

Translate

Translate

Report

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
Enthusiast ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

The collection iterated isn't important. But yes, which overflows property is examined makes all the differerence. See line 213:

if (doc.textFrames[i].parentStory.overflows) {

Checks 'parentStory' property., not the frame's overset property. Look closer at the code. If the parent story overflows, the last text frame for the story is added to an array of oveset text frames, which are then processed. For me, the script works precisely as designed.

 

William Campbell

Votes

Translate

Translate

Report

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
Community Expert ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

@willcampbell7

 

Let's say you have 5 Stories - each one has 100 TextFrames - your code will check all 500 TextFrames, right?

 

If you check if Story overflows - you'll do only 5 checks. 

 

Votes

Translate

Translate

Report

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
Enthusiast ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

OK I see your point. Both paths arrive at the same conclusion, but yes, stories is more efficient. I'll rework it some. Thank you for pointing that out.

 

William Campbell

Votes

Translate

Translate

Report

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
Community Expert ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

@willcampbell7

 

TextFrame can't exist on its own - there is always a parentStory - so if you need to work on text objects in the document - you should work on Stories - or even better - story..texts[0] - to make your code more universal.

 

Votes

Translate

Translate

Report

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
Enthusiast ,
May 09, 2024 May 09, 2024

Copy link to clipboard

Copied

LATEST

Script is updated to iterate stories instead of text frames.

https://www.marspremedia.com/software/indesign/resolve-overset-text

 

William Campbell

Votes

Translate

Translate

Report

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