Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
O seguinte trecho de código também funciona com a biblioteca Aspose.PDF.Drawing.
Você pode excluir páginas de um arquivo PDF usando Aspose.PDF for .NET. Para excluir uma página específica da coleção PageCollection.
// 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.