I'm working on a script about text overflow in InDesign. My purpose is to find how many characters are overflowing textFrame or where text starts to overflow (for each textFrame in document).
So far, I've found that textFrame object has a property called
which indicates if its text overflows. But I could not find more information in this object properties.
Then, I worked on preflight. I try :
var doc = app.activeDocument;
var my_profile = app.preflightProfiles.firstItem();
var my_process = app.preflightProcesses.add(app.activeDocument, my_profile);
var results = my_process.aggregatedResults;
And I get :
We can see that here, we have the information I want. But it depends on user's interface language in InDesign so I cannot properly use this solution.
My last lead is to find information used in that InDesign screen (editor mode) :
Can somebody help me to achieve my purpose please ?
Adobe Community Professional, May 26, 2021May 26, 2021
Manan Joshi • Adobe Community Professional, May 26, 2021May 26, 2021
Hi @emiliep89320758, With the textframe selected run the following code var tf = app.selection var oversetContent = tf.parentStory.insertionPoints.itemByRange(tf.insertionPoints[-1].index, tf.parentStory.insertionPoints[-1].index).contents alert("Overset Content is \""+ oversetContent + "\" length " + oversetContent.length + " starts at index " + tf.insertionPoints[-1].index) -Manan