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

Need InDesign Script for Overset text flow

Explorer ,
Apr 18, 2024 Apr 18, 2024

Hi All.

 

I need to script for overset text flow.

 

Please find the attached sample file and screenshot.

 

 

Thanks...

TOPICS
Scripting
1.8K
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 , 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.

Translate
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.

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

@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. 

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

@brian_p_dts 

 

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

 

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

@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. 

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

@brian_p_dts

 

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?

 

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

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. 

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

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. 

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

@brian_p_dts

 

If you are 100% sure then yes.

 

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

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.

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

Thanks for All

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

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

@willcampbell7

 

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

 

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

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

@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. 

 

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

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

@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.

 

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

Script is updated to iterate stories instead of text frames.

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

 

William Campbell
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