Commands related to Layers

Actions

Enumerate layers

--enumeratelayers [--iccnames] [--fontnames] [--spotnames]
[--language=<language>]

Purpose

Enumerate the chosen objects on separate layers.

Parameters

iccnames
optional, creates a layer for each ICC profile in the PDF
fontnames
optional, creates a layer for each font in the PDF
spotnames
optional, creates a layer for each spot color in the PDF
language
language for naming of layers
Supported values are:
en English
de German
fr French
es Spanish
it Italian
pt Brazilian Portoguese
cz Czech
da Danish
nl Dutch
fi Finnish
ja Japanese
ko Korean
no Norwegian
pl Polish
sv Swedish

Example

pdfToolbox --enumeratelayers --fontnames <PDF file>

Import as layer

--importaslayer [--name="Layer 1"] <import file>

Purpose

Imports the chosen PDF document as a layer in the processed PDF.

  • If e.g. the imported PDF contains 2 page and the document it is imported to contains 5, only page 1 and 2 of the resulting document would contain a layer.
  • If e.g. the imported PDF contains 2 pages and the document it is imported to 1 page, then only the first page would be imported.

Parameters

name
optional, name of the new layer
import file
full path to a PDF to be imported

Example

pdfToolbox --name="My Layer" <PDF file> <PDF file>

Split layers

--splitlayers [--singlepages]

Creates a separate PDF file for every layer view or layer with the content visible when viewing this layer view or single layer.

The name of the output files (if not defined via -o) will have the following syntax:
originalfilename_layer(view)

Parameters

singlepages
optional, creates a separate PDF per page of the original PDF
File names are suffixed using the page number

Example

pdfToolbox --splitlayers --singlepages <PDF file>