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

How to find if text frame is full so that can add new text frame and link to previous one

Explorer ,
May 26, 2020 May 26, 2020

Copy link to clipboard

Copied

I am working in application in which I need to parse the xml files and display its content in the text frame. The issue is there are almost 500 different xml files and there are lot of variations in its content. 

 

I know I can add new text frame and link it to old text frame but how to find out whether the previous text frame is fully occupied or not. There might be condition that frames can be strached up to 4 to 5 pages and some time it get occupied only in one page. Also will be situations where new text frame shouldn't be part of the earlier thread so from which location should I start the new frame.

 

How to handle this scario. Please help..

 

TOPICS
Scripting , SDK

Views

1.2K

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 , May 27, 2020 May 27, 2020

Hi Ashish,

be aware that there could be conditions on text formatting or other contents in stories that would create a permanent text overflow. Even if you are adding text frames to a story.

 

So be very careful with constructions like:

while( myStory.textContainers[ myStory.textContainers.length-1 ].overflows )
{ doSomething() };

 

Always add another condition , perhaps a counter, that could stop the while loop.

 

Regards,
Uwe Laubender

( ACP )

Votes

Translate

Translate
Community Expert ,
May 26, 2020 May 26, 2020

Copy link to clipboard

Copied

Textframe has an overflows property, which returns true if there is an overset

 

-Manan

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 ,
May 27, 2020 May 27, 2020

Copy link to clipboard

Copied

Hi Manan,

 

So does it mean if there is possibility that frame can extend from 1 page to 5 page based on the dynamic contents of xml file I will have to check the frame overflow property 5 times..

 

 

Regards,

 

 

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 27, 2020 May 27, 2020

Copy link to clipboard

Copied

Hi Ashish,

 

I am not aware of your workflow its difficult to guess, however if you are adding frames via code then placing the content then you will have to test the overflow in each textframe to decide if a new frame has to be added and linked. You could also look at using Smart Reflow functionality, which will automatically add pages and textframes if the master textframe has an overset. This should save you from all the trouble of tracking overset and creating new/linking frames. Have a look if it suits your needs

https://helpx.adobe.com/indesign/using/threading-text.html#use_smart_text_reflow

 

-Manan

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 ,
May 27, 2020 May 27, 2020

Copy link to clipboard

Copied

Thanks Manan,

 

Will check if I can handle it with the help of link shared by you..

 

 

 

Regards,

 

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 27, 2020 May 27, 2020

Copy link to clipboard

Copied

Hi Ashish,

be aware that there could be conditions on text formatting or other contents in stories that would create a permanent text overflow. Even if you are adding text frames to a story.

 

So be very careful with constructions like:

while( myStory.textContainers[ myStory.textContainers.length-1 ].overflows )
{ doSomething() };

 

Always add another condition , perhaps a counter, that could stop the while loop.

 

Regards,
Uwe Laubender

( ACP )

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 27, 2020 May 27, 2020

Copy link to clipboard

Copied

Hi Uwe,

 

Could you please elaborate and point the scenarios where this could happen. This is new, that i fortunately never faced, would like to know more about this.

 

-Manan

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 27, 2020 May 27, 2020

Copy link to clipboard

Copied

Hi Manan,

just format two consecutive lines of text of the same paragraph with property no break.

That would send the text to a permanent overflow.

 

Regards,
Uwe Laubender

( ACP )

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 ,
Jun 02, 2020 Jun 02, 2020

Copy link to clipboard

Copied

Ahh, got it that happens because the line width exceeds the textframe width and that can't be resolved without resizing the width of the frame.

 

-Manan

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 ,
Jun 03, 2020 Jun 03, 2020

Copy link to clipboard

Copied

"No Break" is a favourite, but I regularly encounter any and all of these:

 

Hyphenation disabled, asinglelongwordwiderthanthetextframe. Or, all spaces are nonbreaking.

A table with a single row higher than a text frame.

An inline image taller than the text frame.

Text with a left or right indent larger than the width of the frame.

An Indent To Here at the far right of a line.

"Keep with previous/next" applied to multiple long paragraphs.

"Keep all lines together" applied to a single very long paragraph.

Footnote shenanigans: multiple references to some very long footnotes – in a single line of text. (Yeah.)

 

My tactic is to add a frame and then immediately check if it has any contents.

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 ,
Jun 03, 2020 Jun 03, 2020

Copy link to clipboard

Copied

LATEST

Thanks for adding to the list, i will surely keep an eye on these from now on.

 

-Manan

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