Answered
Get the file path of all placed linked files on the page include those within groups
The following allows gets the file paths of all pageItems where item.hasOwnProperty("graphics")
However, this does not get the file paths for the frames that are within a group on that page.
How can we resolve this? Any suggestions or insight would be appreciated. Thank you.
var doc = app.activeDocument;
var viewportBounds = app.activeWindow.activePage.bounds;
var viewportElements = app.activeWindow.activePage.getElements(viewportBounds);
var filePaths = [];
var modifiedFilePaths = [];
var page = app.activeWindow.activePage;
for (var i = 0; i < page.pageItems.length; i++) {
var item = page.pageItems[i];
if (item.hasOwnProperty("graphics")) {
for (var j = 0; j < item.graphics.length; j++) {
var graphic = item.graphics[j];
var filePath = graphic.itemLink.filePath;
// check if file path is already in the array
if(!filePaths[filePath]) {
filePaths[filePath] = true;