Question
Get the Linked Item Page number in the Link Panel
Hi,
I need to get the Page number of the Linked item in the Link Panel. I have used the following script. But it shows an error. Please guide on me to get the Page number of the linked item.
// get the active document
var doc = app.activeDocument;
// loop through all the links in the document
for (var i = 0; i < doc.links.length; i++) {
// get the current link object
var link = doc.links[i];
// get the link properties
var name = link.name; // name of the link
var path = link.filePath; // path of the linked file
var status = link.status; // status of the link (e.g. missing, modified, OK)
var size = link.size; // size of the linked file in bytes
var page = link.page;
alert("Link name: " + name + "\nLink path: " + path + "\nLink status: " + status + "\nLink size: " + size + "\npage: " + page) ;
}
