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

Text On Shape.

Explorer ,
Jun 28, 2022 Jun 28, 2022

Copy link to clipboard

Copied

I want to write text on shape (not on path) without creating new textbox reffering adobe indesign sdk 2022 functions.for example ,write text on rectangle.How to write it using sdk functions.

TOPICS
How to , SDK

Views

152

Translate

Translate

Report

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 29, 2022 Jun 29, 2022

Copy link to clipboard

Copied

you can draw any closed shape you want with pen tool for example, or creat any shape, just go to type tool, click inside the shape and start writing or paste a text inside..

 

or righ mouse click on the shape> content> Text

Screen Shot 2022-06-29 at 10.34.04 AM.png

Votes

Translate

Translate

Report

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
Explorer ,
Jun 29, 2022 Jun 29, 2022

Copy link to clipboard

Copied

It is from UI side. I know how to add text on shape. I want to know about (command/function) for it from indesign sdk .

Votes

Translate

Translate

Report

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 30, 2022 Jun 30, 2022

Copy link to clipboard

Copied

"I know how to add text on shape" - actually it would have been a good idea to desribe in UI terms what you're trying to achieve.

Assuming it is indeed the step described by Manal, that would be kConvertItemToTextCmdBoss where the UIDList is your kSplineItemBoss. The command invokes others such as kNewStoryCmdBoss, kNewFrameCmdBoss and so forth, so it will create a text frame (not box) and combine it with your shape.

 

Votes

Translate

Translate

Report

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
Explorer ,
Jun 29, 2022 Jun 29, 2022

Copy link to clipboard

Copied

For example to add text on path 

kAddTextOnPathCmdBoss is command is used for it .

Votes

Translate

Translate

Report

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 30, 2022 Jun 30, 2022

Copy link to clipboard

Copied

LATEST

Hi @Madhuri1 ,

I'm not exactly sure what you like to do and I cannot help you with the SDK side of things here, but you could do perhaps the following:

 

Let's assume you have one text frame (TF) with one path and a graphic frame (GF) with an arbitrary shape with one path. Spoken in ExtendScript terms you could set the entirePath array of the first path of the TF to the entirePath array of the first path of the GF to shape the text frame according to the path of the graphic frame.

 

//ExtendScript
var TF = app.selection[0];
var GF = app.selection[1];

TF.paths[0].entirePath = GF.paths[0].entirePath;

 

Before:

TextFrame-and-GraphicFrame-selected.PNG

After script run:

TextFrame-and-GraphicFrame-selected-AFTER-ASSINGING-entirePath.PNG

 

Of course this is a very simplistic approach and does not account for example the transformation of an object.

 

Regards,
Uwe Laubender
( Adobe Community Professional )

Votes

Translate

Translate

Report

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