Skip to main content
Participant
May 14, 2009
Question

scale/crop images cs4

  • May 14, 2009
  • 2 replies
  • 1129 views

when importing xml file the images has to be scaled and increased (ex.20%) and fit to their boxes. 

How can this be done easily?

A

This topic has been closed for replies.

2 replies

Participant
May 18, 2009

I'm using this:

function placeImage(fileRef){

imageRect = imagePage.rectangles.add(imageDoc.layers.item(-1), undefined, undefined, {geometricBounds:[0, 0, desiredHeight, desiredWidth], strokeWeight:0, strokeColor:imageDoc.swatches.item("None")});

imageRect.place(File(fileRef),false);

imageRect.fit(FitOptions.fillProportionally);

imageRect.fit(FitOptions.centerContent);

}

hope this helps...
--
Wölf

Robert at ID-Tasker
Legend
May 17, 2009

hi

I think setting right properties in ObjectStyle should fix your problem - InDesign will automatically rescale/resize images to fit boxes

robin

www.adobescripts.co.uk

Participant
May 22, 2009

yeas maybe,

can we set these properties on one tag and make them count on everyone?

U see we make school yearbooks and we allready have indesign templates. The templates has hundreds of small image boxes.

We gonna use snippets and then import XML.

I think it would be OK to do several templates with different crop measure.

But to change proporties of thousands of boxes is to much work.

I hope there is a way to do changes on one box and make it count on everyone in the template.

Then i wouldnt have to use scripts.