InDesignFixups : A script for Adobe Acrobat
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 script is made available 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 Acrobat 8 and 9 on all platforms; an update for
Acrobat 10 will be issued when it's released.
Click here to download (2kb ZIP)
The script, when installed, adds a submenu called "InDesign Fixups" to the Advanced/Document Processing menu item.
To install the script, open the ZIP file from the link above and extract the .js file into your Acrobat JavaScript folder, which on
Windows is usually found at:
/Program Files/Adobe/Acrobat 9.0/Acrobat/JavaScripts
or on a 64-bit machine, at:
/Program Files(x86)/Adobe/Acrobat 9.0/Acrobat/JavaScripts
If you want to check where the folder is on your computer (for all operating systems), open Acrobat and press CMD-J or Ctrl-J
to open the console, type
app.getPath("app","javascript")
and press CMD-Enter or Ctrl-Enter. The path to use will be shown in the console.
Notes:
- The menu item "Unlist Guides and Grids" preserves the nest structure, and simply removes the mention of the layer.
- The menu item "Promote Layers" removes the nest structure, and has an option to also remove the Guides and Grids layer.
- Only the first level of nesting is removed, so to clear multiple-level nests, run the script again.
- Any top-level layers are preserved.
- The action processes all pages of the document.
- The script does not change layer properties, locks, visibility or associated layer actions.
- As the script rewrites the OCG structure, it cannot be undone and so you should always save a backup copy.
- The 'Guides and Grids' layer is empty unless you have checked "Visible guides and baseline grids" in the "Include" area of the
InDesign PDF export dialog. In either case, our script does not delete the layer itself of any content that may be on it; but
removes it from the visible tree displayed in Acrobat and Reader. This means the PDF can still be re-imported into another application.
- If you want to retain the nest structure but change the name of the nest, double-click it in the Acrobat layers sidebar.
- If you want to completely remove the Guides and Grids layer, use the Merge layers command (available by clicking the gears icon
in the layers sidebar) to combine it with another layer - as it has no content, merging it won't alter the appearance of the document.
- The script is provided as-is; if you have any problems with it use the button below to contact us, but we do not provide any warranty.