Answered
Is there a way to delete all my overset text at once?
As mentioned above, i have a huge document with multiple overset (and unwanted) text all around, i want to clean it up and dont want to go one by one.... maybe a script? Thank you !!
As mentioned above, i have a huge document with multiple overset (and unwanted) text all around, i want to clean it up and dont want to go one by one.... maybe a script? Thank you !!
Okay @Lalo Mc. Fly, after accidentally writing the script for Indesign (*facepalm*) here is my attempt at the same script for Illustrator. Let me know if any bugs, and ideally post a sample document that shows the bug.
- Mark
/**
* Remove All Overset Text In Active Document For Illustrator
* @author m1b
* @discussion https://community.adobe.com/t5/illustrator-discussions/is-there-a-way-to-delete-all-my-overset-text-at-once/m-p/13832918
*/
(function () {
var doc = app.activeDocument,
stories = doc.stories,
counter = 0;
for (var i = stories.length - 1; i >= 0; i--) {
var story = stories[i],
lastTextFrame = story.textFrames[story.textFrames.length - 1];
// point text can't be overset
if (lastTextFrame.kind == TextType.POINTTEXT)
continue;
// make a temp frame to take the overset text, if any
var temp = doc.textFrames.areaText(doc.pathItems.rectangle(0, 0, 3000, 3000));
lastTextFrame.nextFrame = temp;
var over = temp.characters;
// remove the overset text
if (over.length && counter++)
for (var j = 0; j < over.length; j++)
story.characters[story.characters.length - 1].remove();
// clean up
temp.remove();
}
alert('Removed ' + counter + ' overset texts.');
})();
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.