The pdfToolbox Rest API - Operation: Split Layers

The Split Layers operation separates a PDF into multiple documents based on its Optional Content Groups (OCGs), also known as layers.

Use this operation when a PDF contains multiple layer configurations that need to be extracted into individual PDF documents.

When to use

Use the Split Layers operation when different versions of a document are stored as layers within a single PDF.

Typical use cases include:

  • Extract language-specific versions of a document.
  • Separate technical drawing layers.
  • Create individual documents from layered artwork.
  • Generate PDFs for specific audiences or production workflows.

Endpoint

Submit a POST request to the Split Layers endpoint.

The operation follows the common asynchronous processing model described in the Overview.

Request

A request consists of:

  • one or more input PDF files,
  • the layer processing options,
  • optional output parameters.

The operation analyzes the layer structure of the input document and generates separate PDF files according to the selected layer configuration.

Response

After processing has completed, the operation returns one or more PDF documents generated from the input file.

The number of output documents depends on the layer structure of the original PDF and the selected processing options.

If processing cannot be completed, the operation returns status and error information.

Typical workflow

A common workflow is:

  1. Submit a layered PDF document.
  2. Configure the desired layer processing options.
  3. Wait for processing to complete.
  4. Download the generated PDF documents.