Skip to main content
Known Participant
April 12, 2024
Question

Longest line in a table cell and in a table column

  • April 12, 2024
  • 2 replies
  • 492 views

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

This topic has been closed for replies.

2 replies

Robert at ID-Tasker
Legend
April 12, 2024

@asaxena 

 

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

 

asaxenaAuthor
Known Participant
April 12, 2024

Hi,

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

Thanks

Robert at ID-Tasker
Legend
April 12, 2024
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.

 

Inspiring
April 12, 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

asaxenaAuthor
Known Participant
April 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.