Quantcast
Channel: Adobe Community : All Content - FrameMaker Scripting
Viewing all articles
Browse latest Browse all 888

Counting line in paragraph

$
0
0

Hello,

 

I usually work with structured FM doc, but for once i need to work with unstructured doc.

 

I need to make a script that check if there is only few chararter at the last line of a paragraph, and if yes, to apply a "spread -2%". and check if i lost one line.

 

I was thinking, if i can compare the number of line of a paragraph before and after the "spread -2%" and if it's "after" is smaller than "before".

If yes => i lost one line in my paragraph.

 

In million paragaph, i can win few pages in my doc (doc large than 1.000 pages)

 

I already have script to walkthrouth all the paragraph of a doc, another to apply and/or check paragraph values (spread).

 

But how can i count the number of line in one paragraph?

Do i have to put my cursor in each line of my paragraph and check the FTI_LineEnd (normal, hard, hyphen) to know when i reach the end of my paragraph? Or there is another way?


Viewing all articles
Browse latest Browse all 888

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>