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.
To delete an image from a PDF file:
The following code snippet shows how to delete an image from a PDF file.
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void DeleteImageFromPDF()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf_Images();
// Open PDF document
using (var document = new Aspose.Pdf.Document(dataDir + "DeleteImages.pdf"))
{
// Delete a particular image
document.Pages[1].Resources.Images.Delete(1);
// Save PDF document
document.Save(dataDir + "DeleteImages_out.pdf");
}
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.