A Christmas Treat: Empty Frame Remover v1.0

splash

UPDATE 2015-01-21: The script has been updated to version 1.1 for downloading after a major bug was found in the script. The major bug was that frames that have been pasted into frames (that contain no fill, stroke, text wrap, text on paths) may be inadvertently deleted. If you have downloaded the script prior to this date, please replace the script with the latest link, and stay posted to this page for any further updates.

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.

As mentioned before, the script is a Beta version and should be used only at one’s own risk. This free script (now version 1.1 as of 2015-01-21) can be downloaded here. For those unfamiliar with installing javascripts in Adobe InDesign, see this site for instructions.

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.


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.