Answered
rob dayCorrect answer
Community Expert
Nov 13, 2026 12:50 PM UTC
How to check the type of pageItems [0], such as constructor. name.
Now I understand pageItems and allPageItems
It’s important to note that allpageItems is an array while pageItems is a collection. You can convert a collection into an array with getElements, but it would not include the images inside of the rectangles.
If I run this code the 2 images are not included in the page items collection, but they are in the all page items array:
var s = app.selection[0];
var api = s.allPageItems
var pi = s.pageItems
alert(pi.length + " page items: \r" +pi.everyItem().getElements())
alert(api.constructor.name + " with " + api.length + " items: \r" + api)



