Analyzing your prompt, please hold on...
An error occurred while retrieving the results. Please refresh the page and try again.
Uma das principais categorias sob as capacidades de extração do namespace Aspose.Pdf.Facades é a extração de anexos. Esta categoria fornece um conjunto de métodos, que não apenas ajudam a extrair os anexos, mas também fornecem métodos que podem lhe dar informações relacionadas ao anexo, ou seja, os métodos GetAttachmentInfo e GetAttachName fornecem informações sobre o anexo e o nome do anexo, respectivamente. Para extrair e, em seguida, obter anexos, usamos os métodos ExtractAttachment e GetAttachment.
O seguinte trecho de código mostra como usar os métodos 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.