Skip to main content
mikes26326174
Inspiring
March 9, 2023
Answered

Get width of textframe column in extendscript

  • March 9, 2023
  • 2 replies
  • 640 views

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 has been closed for replies.
Correct answer Peter Kahrel

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

 

2 replies

Peter Kahrel
Community Expert
Peter KahrelCommunity ExpertCorrect answer
Community Expert
March 9, 2023

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

 

Peter Kahrel
Community Expert
Community Expert
March 9, 2023
columnwidth = frame.textFramePreferences.textColumnFixedWidth
mikes26326174
Inspiring
March 9, 2023

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