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

Overflow in a frame due to textWrap of other

Contributor ,
Jun 08, 2018 Jun 08, 2018

Copy link to clipboard

Copied

Hi All,

My test document contains two frames as shown in below image also see the layers.png

TextWrap-Overflow.pnglayers.png

Top frame have both auto-size (height-only) and textWrap ("wrap around bounding box set")

Now when I start entering text in top frame and it grows then at some point text-insertion in top frames causes the overflows in bottom frame

Is there a way using which I can find that Overflows in bottom frame is caused by "textWrap" set on top frame.?

Regards,

Alam

TOPICS
Scripting

Views

1.0K

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 , Jun 12, 2018 Jun 12, 2018

Hi Alam,

you would go through all page items of a spread and note all items with applied textWrap.

Then you note the value of baseline of the first line of your text frame in question. Now turn off textWrap one by one and with every time you do this check if baseline will change.

Note: It could be the case that more than one item with textWrap influences the baseline of the text frame in question.

Regards,
Uwe

Votes

Translate

Translate
Community Expert ,
Jun 08, 2018 Jun 08, 2018

Copy link to clipboard

Copied

Hi Alam,

you could check the first line of text of the frame that overflows and its baseline property.

If it's position is not where you might suspect it the cause might be text wrap of another object.

Now the question is: Which one?

You could test all objects on the page one after another for text wrap.

Turn it off and see if the value for baseline of the first line of text in the other frame is different.

Regards,
Uwe

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
Contributor ,
Jun 10, 2018 Jun 10, 2018

Copy link to clipboard

Copied

Hi Uwe,

Thanks for reply, Can you named the property which I need to check for baseline position/offset change.

firstline you mean textFrame.lines.item(0) or some other thing?

A sample piece of code will help me to understand your approach, if possible can you provide that

Regards,

Alam

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 11, 2018 Jun 11, 2018

Copy link to clipboard

Copied

Hi Alam,

the property is baseline.

textFrame.lines[0].baseline

See DOM documentation by Jongware:

Indesign JavaScript Help

Here the online DOM documentation:

Adobe InDesign CS6 (8.0) Object Model JS: Line

Regards,
Uwe

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
Contributor ,
Jun 12, 2018 Jun 12, 2018

Copy link to clipboard

Copied

Hi Uwe,

What info I get after fetching baseline of first line of text and how it would be help me to identify textWrap of another object and how I could identify the frame which causes overflow.

Regards,

Alam

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 12, 2018 Jun 12, 2018

Copy link to clipboard

Copied

Hi Alam,

you would go through all page items of a spread and note all items with applied textWrap.

Then you note the value of baseline of the first line of your text frame in question. Now turn off textWrap one by one and with every time you do this check if baseline will change.

Note: It could be the case that more than one item with textWrap influences the baseline of the text frame in question.

Regards,
Uwe

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
Contributor ,
Jun 12, 2018 Jun 12, 2018

Copy link to clipboard

Copied

HI Uwe,

Now your approach is clear to me and will try to implement that one. Thanks

Regards,

Alam

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
Contributor ,
Jun 13, 2018 Jun 13, 2018

Copy link to clipboard

Copied

LATEST

Hi Owe,

Your approach helped a lot during testing I came across one scenario where only baseline property does not work we also need to consider horizontalOffset. (i.e textFrames.lines[0].horizontalOffset)

see the below image here frame gets overflows but its baseline does not change and hence need to use horizontalOffset.

Screen Shot 2018-06-13 at 11.41.37 am.png

Regards,

Alam

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