Tuesday, 29 June 2010

InDesign Fixups : Script to ungroup nested layers in a PDF

When you export a PDF from Adobe InDesign and choose the "Create Acrobat Layers" option, the resulting PDF file contains all the layers from your INDD document, placed in a "nest" structure with the document filename as the heading. Along with the layers you have created in your document, InDesign always adds the "Guides and Grids" layer, even though there is usually nothing in it.

It's not possible to remove this enforced layer structure with the user interface OCG tools in Adobe Acrobat - so we have written a small Acrobat JavaScript that performs two (hopefully-useful!) functions:

  • It promotes all layers inside the nest to the top-level, and deletes the nest.
  • It unlists the 'Guides and Grids' layer from the sidebar panel - the layer is NOT deleted, but it's no longer mentioned.

The document structure is not changed - layers are not flattened, and any layer properties are retained.

The script is made available for free via Creative Commons Share-alike, so you can use it and modify it for personal and commercial purposes provided you do not resell the script itself as a commercial product. It works with Adobe Acrobat 8 and 9, provided you haven't disabled JavaScript!

Click here for more info and to download the script