Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How to create PathText for Ellipse?

Community Beginner ,
Jun 20, 2022 Jun 20, 2022

How can we create PathText for Ellipse shape and Rectangle shape Using Script?

TOPICS
Scripting
402
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Guide , Jun 20, 2022 Jun 20, 2022

 

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.horizontalSca
...
Translate
Adobe
Community Expert ,
Jun 20, 2022 Jun 20, 2022
var idoc = app.activeDocument;
var rect = idoc.pathItems.rectangle (-10, 20, 80, 50); // top, left, width, height
var tframe = idoc.textFrames.areaText (rect);

tframe.contents = "Lorem \nIpsum";

var ellips = idoc.pathItems.ellipse (-80, 20, 80, 50);
tframe = idoc.textFrames.areaText (ellips);

tframe.contents = "Lorem \nIpsum";
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 20, 2022 Jun 20, 2022

Hey Carlos Thank you for the script, I wanted to create PathText using startTValue and endTValue for Ellipse and Rectangle.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jun 20, 2022 Jun 20, 2022

Hi, show a screenshot of what you're refering to please

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jun 20, 2022 Jun 20, 2022

IMG_20220613_202059.jpg

This is what I want to create using startTValue and endTValue property.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guide ,
Jun 20, 2022 Jun 20, 2022
LATEST

 

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--;
}

femkeblanco_0-1655757438185.png

 

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines