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

Help needed to access the InDesign items (TextFrames) within the Rectangle object (InDesign Server)

New Here ,
Jan 26, 2023 Jan 26, 2023

Copy link to clipboard

Copied

I am working on InDesign rendering script (.jsx) for rendering template (.indd) using InDesign Server (Version: 17.2). In my InDesign templates, there are Rectangle ([object Rectangle]) items, that further includes some TextFrames (more than one). When I try to access those TextFrames using [object Rectangle].allpageItems, it gives and empty array. How can I access those TextFrames from the [object Rectangle]? Further, can I get/find the InDesign element/item (TextFrame) using xmlTag name? If yes, then please provide the example by which we can find the item.

TOPICS
How to , Scripting

Views

101

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 ,
Jan 26, 2023 Jan 26, 2023

Copy link to clipboard

Copied

LATEST

Hi @SarahChap ,

you say: "In my InDesign templates, there are Rectangle ([object Rectangle]) items, that further includes some TextFrames (more than one). "

 

How do you know that? Did you build the template?

I'd try that with InDesign Desktop first.

 

The rectangle should contain a group item that itself includes all other frames.

Best make a sample InDesign document available with one rectangle that includes the text frames.

Attach the document to your reply here in the forum.

 

Or do a screenshot when the document is open in InDesign Desktop.

With the rectangle selected and the Layers panel open showing all its contents like that:

 

From my German InDesign 17.4.1.67 on Windows 10:

 

RectangleContainsGroupOfTextFrames.PNG

In this case, the following code:

app.documents[0].rectangles[0].allPageItems.length

will return 5, 1 group and 4 text frames.

 

Thanks,
Uwe Laubender
( Adobe Community Expert )

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