This is what I asked Gemini AI for. It works pretty well… I would be interested to see what you think.
From Gemini:
"Hi everyone,
I wanted to share a lightweight, free-standing layout tool I've been using in the studio to automate roll printing layouts and minimize paper waste on my 24" (610mm) and 36" (914mm) rolls.
Unlike a lot of basic scripts that use simple linear row stacking (which leaves massive empty gaps), this tool uses a proper two-dimensional Maximal-Rectangles packing algorithm. It actively shuffles, flips, and nests smaller prints or proofs into the empty spaces around larger anchor prints to cut down on linear roll yield.
Key Features:
True Additive Borders: You enter the exact target image dimensions (in millimeters) and your required borders. The tool automatically adds the paper borders rather than shrinking your image area.
Smart Roll Optimization: It analyzes your entire queue and calculates whether a 610mm or 914mm roll will yield the absolute least amount of total square-meter waste.
Photoshop Automation via Smart Objects: Instead of exporting flat layouts or gray boxes, clicking "Calculate" downloads a local .jsx script. When run in Photoshop (File > Scripts > Browse...), it builds the exact roll canvas size needed and populates it with Empty Smart Object Layers for every print. You just double-click the layer, drop your high-res artwork in at 100%, and hit save.
How to Use It:
Copy the code below.
Open a plain text editor on your computer (like TextEdit on Mac or Notepad on Windows).
Paste the code and save the file to your desktop as Studio_Nester.html.
Double-click the file to open it locally and offline in your web browser. No servers or internet connection required.”
"Download the attached .txt file, rename the extension back to .html on your desktop, and double-click to use it."