PNG JPG BMP TIFF PDF
Aspose.PDF  for .NET

استخراج المرفقات من PDF في .NET SDK

واجهة برمجة تطبيقات لاستخراج المرفقات في مستندات PDF مع Aspose.PDF Cloud .NET SDK

Get Started

كيفية استخراج المرفقات من مستندات PDF باستخدام واجهة برمجة تطبيقات Cloud C#

للإستخراج المرفقات من مستندات PDF، سنستخدم Aspose.PDF Cloud .NET SDK يتيح لك هذا SDK Quintana سين 얘기-cloud PDF creator, editor & converter apps in C#, ASP.NET, orتلറ്റ് languages for various cloud platforms. Open NuGet package manager, search for Aspose.PDF Cloud and install. You may also use the following command from the Package Manager Console.

Command


PM> Install-Package Aspose.Pdf-Cloud 

خطوات لاستخراج المرفقات باستخدام .NET SDK

A basic extracting attachments programmatically with Aspose.PDF Cloud .NET SDK APIs can be done with just few lines of code.

  1. Upload the PDF file to cloud storage
  2. Retrieve the attachment by index
  3. Display the attachment name

System Requirements

Aspose.PDF Cloud .NET developers can easily extract attachments from PDF documents. Developers need just a few lines of code.

  • .NET Framework 2.0 or later
  • JSON.NET

 

This sample code shows extracting attachments of PDF document using C#


    internal static void GetSingleAttachments()
    {
        var STORAGE_FILE_NAME = "sample_attachment.pdf";
        var LOCAL_FILE_NAME = @"C:\Samples\Attachments\sample_attachment.pdf";
        PdfApi.UploadFile(STORAGE_FILE_NAME, File.OpenRead(LOCAL_FILE_NAME));
        var attachmentsResponse = PdfApi.GetDocumentAttachmentByIndex(STORAGE_FILE_NAME,1);        
        Console.WriteLine(attachmentsResponse.Attachment.Name);
    }