Is there a script that aligns all images in a document to the center of the page?
So I already have a script that selects all the images in a document and resizes them (see below) which I use all the time. Was wondering if there were some lines I could add to the script (or a seperate script) that would align all the images to the center (both horizontially and vertically) of their respective pages. I'm working with 300-page documents containing off-center images so an automated centering script would save me a lot of manual work.
Current script for selecting/resizing all images:
var myDoc = app.activeDocument;
var graphlength = myDoc.allGraphics.length;
for(a=0; a<graphlength; a++)
{
myDoc.allGraphics[a].absoluteHorizontalScale = 113;
myDoc.allGraphics[a].absoluteVerticalScale = 113;
}
