Skip to main content
Known Participant
October 26, 2024
Answered

Resize height and width of multiple sized objects by adding the same measurement to each object

  • October 26, 2024
  • 2 replies
  • 4238 views

Dear Community,

 

I'm hoping there's a solution to this one within Indesign. I have multiple different sized rectangle picture boxes (objects) on a page and need to resize them all at the same time by adding 6 mm to the height and 6 mm to the width of each.

 

Essentially I have a page of many picture boxes of different sizes which I can add crop marks via the script, offset 3 mm from the object. I then need to add 3 mm around all images. And then I can fit content to frame all at the same time. This will then quickly give me images on the page with crop marks and bleed for multiple sized objects on a page ready for printing on large boards, and then images are trimmed down from the one sheet. I'm trying to avoid manually adding the 3 mm to each of the different sized boxes which I have about 150 images.

 

Regards

Simon

Correct answer Robert at ID-Tasker

thanks for the suggestion. I selected 2 frames (filled boxes, no lines) using Shift. But unfortunately still the same result, only 1 frame resizes. It's a bit of a mystery. screenshot attached. thanks so much for your time and expertise.


OK. 

 

You've copied code in the middle of me posting it - I've made a mistake so I've edited it a minute later 🙂 

 

Please REMOVE "[a]" in the "fit" line - it should be: 

 

myObj.fit(FitOptions.FILL_PROPORTIONALLY);

 

2 replies

New Participant
August 11, 2025

I can totally relate, I was facing a similar headache on my own website (https://heightcomparisonchart.com/) where I have to resize multiple elements consistently without manually adjusting each one. The easiest method I’ve used is to select all the frames I want to resize. Then goes to Object → Transform → Transform Each. In the dialog, I checked Relative and added +6 mm to both Width and Height fields.

Robert at ID-Tasker
Brainiac
October 26, 2024

If you work on a PC, I can give you access to the full version of my ID-Tasker tool for a few days. 

 

If you need scripting solution anyway - you need to give more info - from which corner the resizing should be performed - or from the center? 

 

Known Participant
October 26, 2024

I work on a Mac I'm afraid.

 

Resizing from the centre outward for each frame selected. So if I select 100 frames that are all different sizes I'm hoping I can expand each of their sizes by 3 mm each side from the centre. example a 200 x 300 mm frame would end up being 206 x 306 mm, a 400 x 425 mm frame would become 406 x 431 mm etc. Each frame will have a different image in the frame before I apply the 3 mm resize script. 

Robert at ID-Tasker
Brainiac
October 27, 2024

OMG wow. this is quite amazing as i'm a total newbie to scripts. those links to how to install extremely helpful as well as I wouldn't have known. I managed to copy the script and place in a Mac TextEdit file and save as text only (very important step) and then relabelled as .jsx file and placed in Scripts Panel. It's working (AMAZING) but it can only do it ONE at a time. If I select more than one object it will only update one of the objects and not apply to any other objects selected. This is great anyway to be able to do one at a time automatically with a script but is there a way it can do multiple objects as well? So if I select 50, 100, 150 objects it will apply the resize to all of them?


It should do all selected objects? I've tested it and it was working for me? 

 

How do you select your objects? 

 

Can you post some screenshots of what you've selected?