Is there a way to print / export a indesign file as a pdf or other but first annotate any images with the file source ie. user/documents/images.. etc so that whens its printed / exported it will say what the source is for each image by the side / ontop of the image.

1 Answer 1


I used a javascript for this purpose in CS1/3/5.5. I'm not aware of any built in way to do it.

I can't find my oldie around anywhere, but the Adobe InDesign scripting forum is usually a treasure trove. I think this one is at least a start. Here's the final code from that discussion.

var tgt = app.activeDocument.rectangles;
for (i=0;i<tgt.length;i++){
myCaption = app.activeDocument.textFrames.add();
myCaption.textFramePreferences.verticalJustification =
myCaption.contents = tgt[i].graphics[0].itemLink.name
myCaption.paragraphs[0].justification =
bnds = tgt[i].visibleBounds;
myCaption.visibleBounds =
    [bnds[0]-6, bnds[1], bnds[0]-1,bnds[3]];
  • *your javascript
    – sam
    Mar 14, 2014 at 17:36
  • I'll have to dig around a bit. I'll update my answer if/when I can find something. Mar 14, 2014 at 20:54
  • Answer updated. Mar 14, 2014 at 23:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.