Use extraction when the output should contain only a specific subset of pages. The selector supports individual pages, ranges, comma-separated combinations, and last, which is resolved against the current source.
Extract from .NET
using OfficeIMO.Pdf;
PdfDocument source = PdfDocument.Open("case-file.pdf");
PdfPageSelector selection = PdfPageSelector.Parse("1-3,5,last");
PdfDocument extracted = source.Pages.Extract(selection);
File.WriteAllBytes("case-file.extract.pdf", extracted.ToBytes());
The result is a new PDF. Page numbers in the output are compacted to the new document order, while the source file remains unchanged.
Choose the right page operation
Extraction keeps the selected subset. Delete pages does the inverse and keeps everything except the selection. Reorder pages creates a document using the supplied sequence. Keeping these operations separate makes automated policy and user confirmation much clearer.