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
Legend
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
Legend
October 27, 2024

That simply blows my mind. I never knew such things existed. That's incredible. Although what you've created for me is life-changing in my work process.

 

Does a script exist that can move different sized frames on a page to fit as neatly as possible to save space between them to a certain distance apart? Is that getting into AI territory perhaps where it looks at shapes like a jigsaw puzzle and can determine the best way to fit as many frames as possible on the one sheet.

 

I've attached my overall current work process of what i'll be doing and how i'm using your awesome script:

1. have an elevation of a exhibition which will have many different sized frames with images. it's at a scale of 1:100

2. i'll then take a copy and align top and left of all images and then space them out 0.2mm horizontally (this will allow 20 mm between them once at 1:1 scale) to allow crop marks and bleed.

3. will then manually place them on a sheet size grid i've created and work out best way to arrange to save space and fit as many as I can (this is where I wonder if there's a script for this but I think it involves more human assessement rather than computer assessement to work)

4. will then copy and paste each sheet grid layout to a 1:1 sheet size, enlarge by 10000% so it's 1:1

5. apply crop marks to all picture frames (using Indesign standard script), apply 3mm bleed to all picture frames (this is where your amazing script does it's magic), apply fit content to frame for all (that can be done easily all at once within indesign, but i know it can be part of your script as well if need be). 

6. export each final pages as PDF for printer. they print on large sheet and trim images to crop marks provided.


Check this thread: 

 

https://community.adobe.com/t5/indesign-discussions/script-for-bin-packing-automatically-fitting-items-onto-pages/m-p/14927907