Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
يمكن لـ Aspose.PDF إزالة المرفقات من ملفات PDF. يتم الاحتفاظ بمرفقات مستند PDF في مجموعة EmbeddedFiles لكائن Document.
تعمل مقتطفات الشيفرة التالية أيضًا مع مكتبة Aspose.PDF.Drawing.
لحذف جميع المرفقات المرتبطة بملف PDF:
تظهر مقتطفات الشيفرة التالية كيفية إزالة المرفقات من مستند PDF.
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void DeleteAllAttachments()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf_Attachments();
// Open PDF document
using (var document = new Aspose.Pdf.Document(dataDir + "DeleteAllAttachments.pdf"))
{
// Delete all attachments
document.EmbeddedFiles.Delete();
// Save PDF document
document.Save(dataDir + "DeleteAllAttachments_out.pdf");
}
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.