> For the complete documentation index, see [llms.txt](https://docs.apryse.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.apryse.com/ios/layers-ocgs/layers.md).

# PDF Layers (OCGs) on iOS

Learn how to show/hide, add, and extract layers in a PDF document. Optimize your PDF viewing experience with these simple steps. The Apryse iOS SDK streamlines secure document processing and seamlessl

With the introduction of PDF version 1.5 came the concept of Layers. Layers, or as they are more formally known as Optional Content Groups (OCGs), refers to sections of content in a PDF document that can be selectively viewed or hidden by document authors or consumers. This capability is useful in CAD drawings, layered artwork, maps, multi-language documents etc.

PDF OCG (Optional Content Groups) dictionary represents a collection of graphic objects that can be made visible or invisible. Any graphic content of the PDF can be made optional, including page contents, XObjects, and annotations.

Apryse SDK benefits include:

* Extract and render PDF layers (also known as Optional Content Groups, or OCGs)
* A simple to use API to add layers in new PDF documents
* Ability to remove or modify/edit existing PDF layers (OCGs)

## Get started

[Show/hide layers](/ios/layers-ocgs/ocg-layer-browser-i.md) To show or hide a PDF layer in a document.

[Adding a layer](/ios/layers-ocgs/add-layer.md) To add a PDF layer in a new document.

[Extract a layer](/ios/layers-ocgs/extract-layer.md) To extract a PDF layer from a document.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.apryse.com/ios/layers-ocgs/layers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
