Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.PDF는 PDF 파일에서 첨부파일을 제거할 수 있습니다. PDF 문서의 첨부파일은 Document 객체의 EmbeddedFiles 컬렉션에 저장됩니다.
다음 코드 스니펫은 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.