Copy link to clipboard
Copied
I've placed 160 images in an InDesign file. Each is centered within a same-sized frame. I'd like to create a script that fits the frame to the image and draws a .75 pt gray border around it. How can I do this? I've hunted for a similar script I could modify, but so far no luck, and I'm not familiar with the InDesign scripting language.
Thanks!
Instead of a script create an object style and apply it. Object styles can exactly do that.
Copy link to clipboard
Copied
Instead of a script create an object style and apply it. Object styles can exactly do that.
Copy link to clipboard
Copied
Thanks. I hadn't known about object style. I just created one with a border as I described and can quickly apply it to the frame. That gets me halfway there. Is there a way within the object style to also fit the fram to the image? In my ancient version of InDesign, CS6, that doesn't appear to be a fitting option.
Copy link to clipboard
Copied
Hello @DavidOfMA,
Use this script to complete your task...
app.activeDocument.rectangles.everyItem().fit(FitOptions.FRAME_TO_CONTENT);
Regards,
Mike
Copy link to clipboard
Copied
Thanks. I have other frames in this file that I don't want to fit frame to content, so I ended up doing it manually. Still helpful to learn about object styles, though.
Copy link to clipboard
Copied
FYI, CS6 does have these options in object styles: