Scripts that perform 2D bin packing on Adobe Illustrator artboards and Adobe Indesign pages, automating the process of arranging selected page items into artboards or pages, with the aim of achieve a reasonably tight packing.
Update 2024-10-23: showing new Allow Any Rotation
capability:
If this project will save you time, please consider supporting me:
Download script files (zipped):
The repository contains the following script files:
Bin Packing--Artboards.js
(for Adobe Illustrator)Bin Packing--Pages.js
(for Adobe InDesign)Packer.js
(required helper script)packer-blocks.js
(required helper script)Note: Ensure that
Packer.js
andpacker-blocks.js
are located in the same directory as the main script you want to run.
Move the downloaded files to your Adobe application's ExtendScript folder.
See How To Install Scripts in Adobe Illustrator and How To Install Scripts in Adobe Indesign.
Scripts
panel from Window > Utilities > Scripts
(InDesign) or from the File > Scripts
menu (Illustrator).Bin Packing--Artboards.js
or Bin Packing--Pages.js
to execute the script.Prepare your document: Open an Adobe InDesign document and select the items you wish to pack.
Run the script: Execute the script, which will pack your selected items onto the available pages.
Options:
Try harder
is enabled.Created by Mark Bean ("m1b"), inspired by this community discussion. The scripts rely on the 2D bin packing algorithm shared by Trentium (see acknowledgements below).
The 2D bin packing algorithm is by Stackoverflow user trentium published here and for which I am very grateful.
I also acknowledge Adobe community forum user "MarioRossiGD" for support the development of the Indesign version of the original script.
This project is open-source and available under the MIT License. See the LICENSE file for details.