I know already that OCGs (optional content groups) describe Layers and Watermarks.
Are there other common elements within a PDF that are also OCGs?
(If it helps with your response I'm a user, not a developer, and generate layered PDFs from InDesign. I'm wanting to script some basic reporting tasks like creating a text list of all named layers.)
Copy link to clipboard
Are you asking in the abstract or specifically what layer information can be defined in InDesign that can be expressed in the PDF and rendered by the Adobe viewers?
Technically, annotation appearances including form field widgets can belong to an OCG but there are no tools currently available to define or interact with them.
It might help if you elaborated on what information your reporting tool is meant to convey, for what purpose, and to whom.
My intial task is to create an Action that reads the layer names from a PDF, then writes the filename and layernames into a .txt file.
Since the API appears to lump Layers and Watermarks into the category of OCGs, I'm wondering what else is going to show in this report. The recipeint and user of the report may become confused if there is extraneous data; I'd prefer to not clean anything up along the way.
We currently copy the layer names directly from an open InDesign file (using a script we found online) and paste/save into a .txt file. This is simple but requires a bunch of repetitive handling with opening, running, creating, pasting, saving, and closing. We need to do this a few hundred times/month.
By creating an action with JS, the report could be generated by the user who already has the PDF, just needs a way to capture for another purpose.
Ok - I'm not aware of anything that InDesign would create that would result in an OCG being created other than an InDesign layer.