Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
The following code snippet also work with Aspose.PDF.Drawing library.
You can delete pages from a PDF file using Aspose.PDF for .NET. To delete a particular page from the PageCollection collection.
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void DeletePageFromPdfFile()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf_Pages();
// Open PDF document
using (var document = new Aspose.Pdf.Document(dataDir + "DeleteParticularPage.pdf"))
{
// Delete a particular page
document.Pages.Delete(2);
// Save PDF document
document.Save(dataDir + "DeleteParticularPage_out.pdf");
}
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.