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

Longest line in a table cell and in a table column

Contributor ,
Apr 11, 2024 Apr 11, 2024

Copy link to clipboard

Copied

Hi,

 

I have a requirement to find the longest line and it's length in an InDesign Table Cell and also in an InDesign table column.

 

I am afraid but I do not know where to begin looking for getting this information. Any pointer to specific documentation or reference code will really help me.

 

Thanks

TOPICS
How to , SDK

Views

98

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 ,
Apr 11, 2024 Apr 11, 2024

Copy link to clipboard

Copied

Hi @asaxena,

 

There is no direct way to get the longest line from table column.

 

You need to iterate each cell and make use of IWaxLine Interface -

 

IWaxLine->GetWidth();

 

- Rahul Rastogi

- Adobe InDesign Custom C++ Plugin Architect

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 ,
Apr 12, 2024 Apr 12, 2024

Copy link to clipboard

Copied

Ok. Thank you. Where can I read up on this interface and the concept of "wax line"? For example, I want to understand how to set the horizontal justification of cell content to Right, Left, Center etc. I am not able to get a good starting place to understand the concepts involved. Please advice.

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 ,
Apr 12, 2024 Apr 12, 2024

Copy link to clipboard

Copied

@asaxena 

 

You've tagged "SDK" - are you looking for plugin solution or scripting solution?

 

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 ,
Apr 12, 2024 Apr 12, 2024

Copy link to clipboard

Copied

Hi,

I would prefer the C++ plugin solution but implementing in a jsx called from my plugin is also perfectly fine.

Thanks

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 ,
Apr 12, 2024 Apr 12, 2024

Copy link to clipboard

Copied

LATEST
quote

Hi,

I would prefer the C++ plugin solution but implementing in a jsx called from my plugin is also perfectly fine.

Thanks


By @asaxena

 

I asked "just in case".

 

With JS - you would have to build collection / array - using "everyItem()" - for cell's texts, iterate though this list and check length.

Or get only columns and then do 2-in-1 - check columns and cells in those.

 

But I'm not an JS expert and even less in plugins - only VB.

 

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