I have about 50 rectangular pieces of paper, with dimensions between 1 and 5 inches and different "aspect ratios." I'd like to fit them all inside the smallest rectangle possible. Additional constraints are that each rectangle should not be rotated (imagine they all have an arrow on them, and the arrow must be pointing up) and no rectangle be cropped or resized.

enter image description here

I've tried approaching this from two angles. First was digital collage software. However, it seems that because collage software are used for digital collages, most if not all don't have options to preserve image size. Many seemingly don't even have options to disable automatic cropping.

Second, I've looked into nesting software used for CNC and laser cutters. This seems more promising, but most do not have an option to disable rotation, most are priced for commercial use by big companies, and many require knowledge of CAD software (no .svg importing).

What software (either standalone or plugin/scripts for Photoshop or Illustrator) could help me with this problem? I'm aware of questions like this and this; I'm hoping that better solutions exist for shapes that are irregular, but all rectangular.

  • Interesting. May I ask what this is for?
    – Wolff
    Nov 21, 2020 at 1:31
  • If no image can be cropped or resized or rotated, then to be honest, I don't see how it would be possible to get such an exact fit inside a rectangle. You can try experimenting using SVG Nest. You can set the rotations to 0 in the settings.
    – Billy Kerr
    Nov 21, 2020 at 8:10
  • Even after 300 iterations with SVG Nest, the best you can probably get is something like this
    – Billy Kerr
    Nov 21, 2020 at 8:16
  • Also note SVG Nest only works with vector objects
    – Billy Kerr
    Nov 21, 2020 at 8:21
  • @BillyKerr I'm not sure what the rotation setting on SVGnest does, but it does not prevent rotation from the original orientation. I'm guessing what it does is modify the number of rotations between iterations. i.imgur.com/ojIBkwx.png
    – wavedash
    Nov 21, 2020 at 20:08

3 Answers 3


Update: I found a pretty good solution, https://www.cutlistoptimizer.com/

It's basically a nesting program for cutting rectangular pieces of wood from a larger sheet. Because it's designed for wood, there's an option to disable rotating (and it's free). You can get something like 5-10 free optimzation calculations per day, which seems very generous.


Check out this page (direct link to zip here). It's pretty old, but it should do the job. Use the "BatchPicturePackageNoRotate.jsx" script.

  • I'm not sure I understand how this script works. The first thing it asks for is a template; how do I generate the optimal template?
    – wavedash
    Nov 21, 2020 at 7:42
  • @wavedash read through the page's section for "Photo collage and mockup tools". It explains how to build a template, and offers some templates for download. Nov 21, 2020 at 15:16
  • I'm pretty sure I know how to manually prepare a template, and then automatically populate it. However, I'm not seeing any documentation on how to automatically make a template.
    – wavedash
    Nov 21, 2020 at 20:18
  • I see the problem now - I don't think this script will do what you're looking for. Best of luck. Nov 22, 2020 at 15:55

This free online tool is worth a look, it should do what you're looking for CutList Optimizer | WorkshopBuddy. I've included an example pattern which is pretty close to your example.

An example pattern

  • 2
    Thats been answered allready
    – joojaa
    Jun 22, 2021 at 15:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.