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

Get width of textframe column in extendscript

Explorer ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

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

Views

336

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 2 Correct answers

Community Expert , Mar 09, 2023 Mar 09, 2023
columnwidth = frame.textFramePreferences.textColumnFixedWidth

Votes

Translate

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

 

Votes

Translate

Translate
Community Expert ,
Mar 09, 2023 Mar 09, 2023

Copy link to clipboard

Copied

columnwidth = frame.textFramePreferences.textColumnFixedWidth

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

Copy link to clipboard

Copied

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

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

Copy link to clipboard

Copied

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

 

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