# Delete selected pages from a PDF copy

Remove selected PDF pages from a newly generated copy after explicit confirmation, while keeping the original browser-selected document unchanged.

Organize PDF pages

[Delete pages in the browser](/browser/delete-pages/) [Read the .NET guide](/docs/pdf/operations/)

Deletion summary

**Input**

PDF and page selection

**Output**

PDF without selected pages

**Package**

[OfficeIMO.Pdf on NuGet](https://www.nuget.org/packages/OfficeIMO.Pdf)

**Runs on**

Browser-local WebAssembly or .NET

**Microsoft Office**

Not required

**License**

MIT

The browser requires explicit confirmation and never overwrites the selected source file.

[Browse all PDF workflows](/pdf/)

Practical steps

## Remove pages from a downloaded PDF copy

Choose the pages to exclude, confirm the permanent change to the output, and create a separate document.

1. **Select**Choose one PDF and enter a one-based page expression.
2. **Confirm**Acknowledge that the selected pages will not exist in the downloaded copy.
3. **Create**Generate the new PDF and review the source and output page counts.

Deletion is an output transformation, not an in-place edit. The browser requires confirmation because the selected pages are permanently absent from the downloaded artifact, even though the source remains untouched.

## Delete pages from .NET

```csharp
using OfficeIMO.Pdf;

PdfDocument source = PdfDocument.Load("packet.pdf");
PdfPageSelector pagesToRemove = PdfPageSelector.Parse("2,4-6");
PdfDocument result = source.Pages.Delete(pagesToRemove);

File.WriteAllBytes("packet.cleaned.pdf", result.ToBytes());
```

Validate the output page count and required content before replacing or archiving any original outside OfficeIMO. Application code owns storage and overwrite policy; the PDF API returns a new document model.

## When extraction is clearer

If the business rule identifies pages to keep, use [extract pages](/pdf/extract-pages/) instead. Expressing the positive selection often makes retention and disclosure workflows easier to review than maintaining a growing exclusion list.

## API used on this page

- [`PdfDocument`](/api/pdf/officeimo-pdf-pdfdocument/)

<!-- PowerForge markdown artifact sha256:FBEB9960C6EEFCF2256B995FAB864399B1F49AF292195F7D52DD94E626F60A73 -->
