Skip to content

Instantly share code, notes, and snippets.

@AlexeyNik
Created July 28, 2020 03:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexeyNik/2e1777fa1d7b51ed866750203394b142 to your computer and use it in GitHub Desktop.
Save AlexeyNik/2e1777fa1d7b51ed866750203394b142 to your computer and use it in GitHub Desktop.
//https://forum.rudtp.ru/threads/najti-perejti-k-frejmu-gde-tekst-ne-prilegaet-k-nizhnej-granice.75885/
var tfs = app.activeDocument.textFrames.everyItem().getElements();
for (var i = 0; i < tfs.length; i++) {
var tf = tfs[i];
var line = tf.lines.lastItem();
if (line.isValid) {
var bottom = tf.geometricBounds[2] - tf.textFramePreferences.insetSpacing[2];
var baseline = line.baseline;
if (bottom - baseline > 0.1) {
$.writeln(tf.id);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment