Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Potongan kode berikut juga bekerja dengan pustaka Aspose.PDF.Drawing.
Untuk menghapus gambar dari file PDF:
Potongan kode berikut menunjukkan cara menghapus gambar dari file PDF.
// 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.