Home/ Reference/ Layer Advanced

page.CreateLayer(Name)

Adds a layer to the page. Good habit: background, content, text and annotations each on their own layer, so the client sees instantly what to touch.

Signature

page.CreateLayer(Name)

Notes

Adds a layer to the page. Good habit: background, content, text and annotations each on their own layer, so the client sees instantly what to touch.

Python example (runnable)

Requires pywin32. The example assumes app / doc / page / layer are already connected. See Connection & Init
Python
layer = page.CreateLayer("Text layer")                  # new layer
print("New layer name: ", layer.Name)
print("Layers on this page: ", page.Layers.Count)

for i in range(1, page.Layers.Count + 1):
    print(i, page.Layers.Item(i).Name)

About this section: Layer Advanced

Layer Advanced — multi-layer and multi-page workflows.

Other entries in this section