Answered
How to create PathText for Ellipse?
How can we create PathText for Ellipse shape and Rectangle shape Using Script?
How can we create PathText for Ellipse shape and Rectangle shape Using Script?
var contents = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua."
var idoc = app.activeDocument;
var rect = idoc.pathItems.rectangle(-10, 10, 100, 100);
var tframe1 = idoc.textFrames.pathText(rect, 0.5, 3.5); // startTValue = 0.5, endTValue = 3.5
tframe1.contents = contents;
// fit text to path
while(tframe1.lines[0].characters.length < tframe1.characters.length) {
tframe1.textRange.characterAttributes.horizontalScale--;
}
var ellips = idoc.pathItems.ellipse(-130, 10, 100, 100);
tframe2 = idoc.textFrames.pathText(ellips, 0.5, 3.5); // startTValue = 0.5, endTValue = 3.5
tframe2.contents = contents;
// fit text to path
while(tframe2.lines[0].characters.length < tframe2.characters.length) {
tframe2.textRange.characterAttributes.horizontalScale--;
}
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.