---
title: ".DeletePages (.PdfDocument Objektmethode)"
---
[TOC]

#### Beschreibung

Deletes one or more consecutive pages from the document. Call Save afterwards to obtain the modified PDF.

#### Argumente

<table style="table-layout: fixed; width: min(100%, 602px);"><colgroup><col style="width: 18.1%"><col style="width: 14.8%"><col style="width: 67.1%"></colgroup><tr><th><p><strong>Name</strong></p></th><th><p><strong>Typ</strong></p></th><th><p><strong>Beschreibung</strong></p></th></tr><tr><td><p>StartIndex</p></td><td><p><a href="/smt-school-professional/technische-dokumentation/opus-dokumentation/standard-datentypen/integer/"><u>integer</u></a></p></td><td><p>zero-based index of the first page to delete (0 = first page)</p></td></tr><tr><td><p>Count</p></td><td><p><a href="/smt-school-professional/technische-dokumentation/opus-dokumentation/standard-datentypen/integer/"><u>integer</u></a></p></td><td><p>(optional) number of pages to delete (default 1); clamped so it never runs past the last page</p></td></tr></table>

#### Rückgabewert [<u>integer</u>](../../../standard-datentypen/integer.md)

number of pages actually deleted, or -1 on error

#### Beispiel

| `xxx` |
| --- |
