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.
Copy link to clipboard
Copied
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:
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 )