How to identify the page number of pasted image in Indesign file?
Hello,
I'm eager to know about, how to identify the page number of the pasted image in Indesign file through a script?
Any help on this highly appreciated.
Hello,
I'm eager to know about, how to identify the page number of the pasted image in Indesign file through a script?
Any help on this highly appreciated.
It's working in CS4. Although page 2 has two images. But the script showed only one image on page 2.
Thanks
Pramod
One of them is a group, try the following for CS4
for(var i = 0; i < app.documents[0].allGraphics.length; i++)
{
if(app.documents[0].allGraphics.itemLink == null)
{
var a = app.documents[0].allGraphics
var parent = app.documents[0].allGraphics.parent
while(parent.constructor.name != "Spread" && parent.constructor.name != "Page")
parent = parent.parent
if(parent.constructor.name == "Page")
alert("Pasted image on " + parent.name)
else if(parent.constructor.name == "Spread")
alert("Pasted image on pasteboard")
}
}
-Manan
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.