Reply To: A way to change the size of the multi inline graphics

Home Page / Forums / General InDesign Topics (CLOSED) / A way to change the size of the multi inline graphics / Reply To: A way to change the size of the multi inline graphics

#51392

Ah – a script! Sure, this one ought to do it. Replace the “14” in the 6th line with the size you want, vertically. Then have the text cursor somewhere in the text containing the inline graphics, and double-click the script. It'll rescale all inline graphics to “14” (or whatever you enter) units in the current measurement system.

With a minor adjustment it can also change the width to a constant value.

Warning: it'll try to resize all images, but it will fail on non-image stuff (such as inline placed textboxes and line art).

if (app.selection[0].hasOwnProperty ("baseline"))

{

for (g=0; g<app.selection[0].parentStory.allGraphics.length; g++)

{

if (app.selection[0].parentStory.allGraphics[g].hasOwnProperty("absoluteHorizontalScale"))

{

b = app.selection[0].parentStory.allGraphics[g].parent.geometricBounds;

scale = 14/(b[2]-b[0]);

app.selection[0].parentStory.allGraphics[g].parent.absoluteHorizontalScale *= scale;

app.selection[0].parentStory.allGraphics[g].parent.absoluteVerticalScale *= scale;

}

}

}

This article was last modified on August 20, 2015

Comments (0)

Loading comments...