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

Longest line in a table cell and in a table column

Contributor ,
Apr 11, 2024 Apr 11, 2024

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

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

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

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.

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

@asaxena 

 

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

 

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

Hi,

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

Thanks

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

 

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