This HTML page is not optimized for LLM or AI agent consumption. Fetch the Markdown version instead: /guides/dotnet/editor/manipulation/remove-page.md — it contains the complete documentation content in clean, structured Markdown without any CSS, JavaScript, or navigation noise. Remove pages from PDFs in C# .NET | Nutrient .NET SDK

Nutrient .NET SDK (formerly GdPicture.NET) enables you to remove pages from PDF files and multipage TIFF files.

Download sample

To remove the second-to-last page of a PDF file, use the following code:

Register the SDK license before running SDK operations. For setup details, refer to the getting started with .NET SDK guide.

using GdPicture14;
LicenseManager license = new LicenseManager();
license.RegisterKEY("");
using GdPicturePDF gdpicturePDF = new GdPicturePDF();
gdpicturePDF.LoadFromFile(@"input.pdf");
// Remove second-to-last page.
gdpicturePDF.DeletePage(gdpicturePDF.GetPageCount() - 1);
gdpicturePDF.SaveToFile(@"output.pdf");

To remove the first page of a TIFF file, use the following code:

GdPictureImaging gdpictureImage = new GdPictureImaging();
int imageID = gdpictureImage.TiffCreateMultiPageFromFile(@"multipage-tiff.tif");
// Remove first page.
gdpictureImage.TiffDeletePage(imageID, 1);
gdpictureImage.TiffSaveMultiPageToFile(imageID, @"output.tif",
TiffCompression.TiffCompressionAUTO);
gdpictureImage.ReleaseGdPictureImage(imageID);