Related subjects →  Tutorial , Layer .

Layers in a PDF document are not the same as layers in design programs such as InDesign or Illustrator. In fact, in the PDF format official documentation by Adobe, what we call "layers" are described as "Optional content groups" (OCG).

Imagen.

In design programs, layers are stacks of groups of objects. Layers that are on top are seen in front. Layers that are underneath are seen behind.

Imagen.

In PDF format, elements associated with the same optional content group (OCG) can be in front of or behind elements associated with another group (layer).

These differences have as a result a different approach to objects in layers in PitStop action list commands.

To understand this: An object is not inside a layer, it has a layer assigned to it for visibility and printing, so when the layer is deleted, the object is not deleted (as it would be if it were inside the layer). What happens is simply that the object is no longer assigned to that layer:

  • A document does not necessarily have to have layers (an InDesign document, for example, has at least one layer).

  • An object does not have to belong to any layer, even if there are layers in the document.

  • An object can belong to more than one layer at the same time (but if their visibility or printability rules are not set carefully, this can cause unexpected results).

  • Removing a layer does not delete the objects associated with it.

  • An empty layer has no objects assigned to it, but it still exists unless deleted.

  • Layers in a PDF may have an apparent stacking order, but this does not mean the same as in graphic design programmes, where the upper layers are in front of or on top of the lower ones.

    In a PDF, Acrobat may shows us in its interface a layer as if it were above another one but the PDF is displayed (or printed) with its objects covered by the supposedly lower layer. This is not a mistake.

    It is common that PDF layer order and objects stacking match because PDF documents usually come from programmes where both things match, but we must be remembered that in PDF this is not mandatory.

The optionality of layers is related with two things: Printing and displaying.

  • imagen.

    The content of a layer can be marked as visible, not visible or only visible if it is activated ("On").

  • Imagen.

    The content of a layer can be printable, non-printable or only printable if it is visible.

These states can be changed. These changes affect the whole document, they cannot be limited to just a few pages, as layers and their state exist on all pages of a document.

Optional content groups (OCG) can be grouped ("nested"). These groups or nestings of layers can be given their own visibility and printability qualities. The layers gathered in these groupings are considered as sub-layers.

Warning: Programs like Adobe InDesign have the annoying habit of nesting all layers of a PDF in a top group by default. Adobe Illustrator, on the other hand, does not.

Several layers can have the same name (but this is not a good idea).

Imagen.

In Acrobat, we can browse and change layers through the "Layers" menu.

Imagen.

Note: An important detail is that what PitStop calls "Default state", does not mean that it is or it is not visible from the beginning. It means that the state of that layer is declared as such. In Acrobat we can see that in its menu "Layers - Layer Properties - Default State". There are two possibilities: "On" and "Off". What we set below as "Initial state" is not what PitStop considers as "Default state".