Question
Align image to page script
I was hoping to write a tiny script to align the current selected image to the page:
// DOES NOT WORK!!! USE AT YOUR OWN RISK
var srcDoc = app.activeDocument;
var alignTo = AlignDistributeBounds.PAGE_BOUNDS;
var sel = srcDoc.selection;
srcDoc.align ( sel, AlignOptions.VERTICAL_CENTERS, alignTo);
srcDoc.align ( sel, AlignOptions.HORIZONTAL_CENTERS, alignTo); But InDesigned crashed - but I can't think where I'm going wrong.
DON'T use the script in it's current form
Answers on a postcard, please.
