Skip to main content
mikes26326174
Inspiring
Mar 9, 2023 2:24 PM UTC
Answered

Get width of textframe column in extendscript

Hi,

 

I wrote a script that loops over all graphics in an indesign document and resizes them to the width of the textframe. I do this by finding out the width of the parent textframe. But some of the documents contain textframes that have two coulmns, so I need to find out the width of those columns to resize the graphics correctly.
Is there a way to find out the width of the textframe-column in which a graphic is placed ?

 

This topic is closed to new replies. Start a new post to keep the conversation going.
Peter Kahrel
Peter KahrelCorrect answer
Community Expert
Mar 9, 2023 2:47 PM UTC

You can find most of these things in DOM overviews. You can use the ESTK's object-model viewer, or use extracted versions such as https://www.indesignjs.de/extendscriptAPI/indesign-latest/#about.html

frame.textFramePreferences.textColumnGutter

 

3 replies

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
Mar 9, 2023 2:47 PM UTC

You can find most of these things in DOM overviews. You can use the ESTK's object-model viewer, or use extracted versions such as https://www.indesignjs.de/extendscriptAPI/indesign-latest/#about.html

frame.textFramePreferences.textColumnGutter

 

Translate
Peter Kahrel
Community Expert
Community Expert
Mar 9, 2023 2:32 PM UTC
columnwidth = frame.textFramePreferences.textColumnFixedWidth
Translate
mikes26326174
Inspiring
Mar 9, 2023 2:42 PM UTC

Thank you. Can I also access the value for the space between the two columns or do I have to calculate this ?

Translate