Skip to content
ComPDF
DemoSampleAPI ReferenceFAQ
New Release

Open-Source PDF SDK & AI Document Processing

Get the full self-hosted SDK and AI document processing on GitHub. One-click deploy to quickly build your document workflows.

Delete Pages

This example shows how to delete pages:

C#
List<int> pageNumbersToRemove = new List<int>(){1};

// Delete the first page of the document.
document.RemovePages(pageNumbersToRemove.ToArray());