Home
> InDesign Scripts > Find embedded images
Find embedded images
This is not my script, but I find it really handy! It searches through all links in document and finds just embedded links and push them into Array.
var doc = app.activeDocument; var graphics = doc.allGraphics; var embeddedGraphics = []; for (var i = 0; i < graphics.length; i++) { if (graphics[i].itemLink.status == LinkStatus.LINK_EMBEDDED) { embeddedGraphics.push(graphics[i]); } } alert(embeddedGraphics.length + " embedded images were found");
When you have links in embeddedGraphics you can for example extract page number from link like this:
alert(embeddedGraphics[0].parent.parent.name);
Or link name:
alert(embeddedGraphics[0].itemLink.name);
Or effective ppi:
alert(embeddedGraphics[0].effectivePpi);
I want to credit Kasyan Servetsky as author of this short snippet. This was also published on Adobe’s InDesign Scripting forum.
Categories: InDesign Scripts
InDesign CS4, InDesign CS5, Kasyan Servetsky
Comments (0)
Trackbacks (0)
Leave a comment
Trackback