I am looking for a way to resize incoming images from a xml export when it is imported it into Indesign.
Some images have for instance a width of 4500 mm on 72 dpi and comes into Indesign at an image size that exceeds the width of the text frame (never to be seen again... overset). We already have made a script that assigns each incoming graphic to a specific object style, based on a script of Laubende, but we are looking for a script that also resizes a graphic container on import.
Is this even possible? (resize/adjust the container size of an incoming graphic on xml import in Indesign, preferably to a size of for instance 160 mm width on import, WITH A SCRIPT)?
Quick snippet ...
var doc = app.activeDocument; var mRectangle = doc.xmlElements.xmlElements.itemByName("IMAGE").xmlContent.parent; var mBounds = mRectangle.geometricBounds; mRectangle.geometricBounds= [mBounds, mBounds, mBounds, mBounds+160]; mRectangle.graphics.fit(FitOptions.proportionally); mRectangle.graphics.fit(FitOptions.centerContent);
thank you for your quick answer. I will look into it.