A Christmas Treat: Empty Frame Remover v1.0
December 22, 2013 Leave a comment
Wishing to revive an older post “Cleaning up the Scraps”, many hours of research have been invested to prepare scripts that will remove unused or unwanted items from an InDesign file. As previously posted, scripts already exist to fix some issues such as removing unused swatches or paragraph styles. Recent research has shown though that some scripts previously identified as working did in fact have issues when used in conjunction with master pages that were based on other master pages, namely removing unused master pages and removing unused layers. Ultimately, one “clean-up” script would be nice, but that is still very much a work in progress.
In an effort to get the ball rolling, it was decided to start with what should be a simple script – remove boxes that have no fill or stroke. Well, it wasn’t exactly simple… in fact it was an ordeal, and potentially an ongoing one – the full extent of effort, particularly of those who volunteer their time and effort on the Adobe Forums can be found here. Right now, the script is at a level where Beta testing can begin.
So far, this script removes only frames that:
- contain no images, AND
- have no fill, AND
- have no stroke, AND
- have no text wrap, AND
- are any closed shape, AND
- are not part of a group, AND
- are empty text, graphic or unassigned frames, AND
- have no type on a path around it
The script also works on anchored/inline objects, and leaves threaded text untouched.
This script would not be possible without the time, effort, support, guidance and assistance from all those who volunteer their time on the Adobe Forums website. The full list of participants and how the script was assembled can be found on this Adobe Forum page.
Any concerns, comments, feedback or bug reports are more than welcome.
UPDATE 2014-01-11: A recent email suggested that there may be issues with the script deleting empty boxes that are used intentionally as part of multi-state objects or buttons. This has been tested and it appears that this is NOT the case, but do note that this script was created with the focus of removing empty text boxes from files created with the intent of print production.