Type Default Read Only Description
[C#]
int

[Visual Basic]
Integer
  1 No The insertion layer for new content.

 

   

Notes
 

The insertion layer for new content.

The default layer is one which indicates insertion at the top. So if you want to insert at the bottom and your page has ten layers you need to insert at position eleven.

Note that insertion may not behave predictably with documents read from file. It is good practice for each layer to operate independently but not all documents are set up this way.

Optional Content Groups: The type of layer that this property describes is an ABCpdf construct that you cannot detect using Acrobat. Acrobat layers are something completely different and are more precisely known as Optional Content Groups (OCGs).

See the Doc.Layer property for details of how to construct this type of layer.

 

Optional Content Groups. The type of layer that this property describes is an ABCpdf construct that you cannot detect using Acrobat. Acrobat layers are something completely different and are more precisely known as Optional Content Groups (OCG items).

OCGs allow you to specify content that may be visible or invisible. As a user you can see the names of the OCGs that exist and you can turn them on or off to see or hide the respective content.

It is a mistake to think of OCGs as pure layers, as the rules associated with them can be quite sophisticated. Each content item on the page may be associated with one or more nested visibility groups and it is only if all these groups are visible that the content item is visible. While visibility groups are often OCGs they can also be Optional Content Membership Dictionaries (OCMD items) - a construct that determines visibility from a set of OCGs using a set of custom written rules. So visibility can be complex and items with visibility may be interleaved rather than conceptually part of a simple contiguous layer.

That said, it is quite common for simple OCG setups to mimic simple contiguous layers as this is what most people require.

The OCGLayers example project which comes with ABCpdf shows how to create content with visibility determined using OCGs. It also includes more complex examples detailing the use of nested OCGs and OCMDs. As well as creating layers it also shows shows how to turn OCGs on and off, annotate the items on a page based on the OCGs that they belong to and how to redact and delete invisible items, removing any associated OCGs.

 

   

Example
 

None.