Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Aspose.Pdf.Facades名前空間の抽出機能の主なカテゴリの1つは、添付ファイルの抽出です。このカテゴリは、添付ファイルを抽出するだけでなく、添付ファイルに関連する情報を提供するメソッドのセットを提供します。すなわち、GetAttachmentInfoおよびGetAttachNameメソッドは、それぞれ添付ファイル情報と添付ファイル名を提供します。添付ファイルを抽出し、取得するためには、ExtractAttachmentおよびGetAttachmentメソッドを使用します。
以下のコードスニペットは、PdfExtractorメソッドの使用方法を示しています:
// For complete examples and data files, visit https://github.com/aspose-pdf/Aspose.PDF-for-.NET
private static void ExtractAttachments()
{
// The path to the documents directory
var dataDir = RunExamples.GetDataDir_AsposePdf_Attachments();
// Create the extractor
using (var pdfExtractor = new Aspose.Pdf.Facades.PdfExtractor())
{
// Bind PDF document
pdfExtractor.BindPdf(dataDir + "GetAlltheAttachments.pdf");
// Extract attachments
pdfExtractor.ExtractAttachment();
// Get attachment names
if (pdfExtractor.GetAttachNames().Count > 0)
{
Console.WriteLine("Extracting and storing...");
// Get extracted attachments
pdfExtractor.GetAttachment(dataDir + "GetAlltheAttachments_out.pdf");
}
}
}
Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.