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

Get width of textframe column in extendscript

Explorer ,
Mar 09, 2023 Mar 09, 2023

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 ?

 

TOPICS
Scripting
489
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 2 Correct answers

Community Expert , Mar 09, 2023 Mar 09, 2023
columnwidth = frame.textFramePreferences.textColumnFixedWidth
Translate
Community Expert , Mar 09, 2023 Mar 09, 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

 

Translate
Community Expert ,
Mar 09, 2023 Mar 09, 2023
columnwidth = frame.textFramePreferences.textColumnFixedWidth
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 ,
Mar 09, 2023 Mar 09, 2023

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

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 ,
Mar 09, 2023 Mar 09, 2023
LATEST

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