ByteScout PDF Suite - C# - Extract Attachments from PDF with PDF Extractor SDK - ByteScout

ByteScout PDF Suite – C# – Extract Attachments from PDF with PDF Extractor SDK

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Suite – C# – Extract Attachments from PDF with PDF Extractor SDK

How to extract attachments from PDF with PDF extractor SDK in C# with ByteScout PDF Suite

How to write a robust code in C# to extract attachments from PDF with PDF extractor SDK with this step-by-step tutorial

We made thousands of pre-made source code pieces for easy implementation in your own programming projects. ByteScout PDF Suite can extract attachments from PDF with PDF extractor SDK. It can be applied from C#. ByteScout PDF Suite is the bundle that provides six different SDK libraries to work with PDF from generating rich PDF reports to extracting data from PDF documents and converting them to HTML. This bundle includes PDF (Generator) SDK, PDF Renderer SDK, PDF Extractor SDK, PDF to HTML SDK, PDF Viewer SDK and PDF Generator SDK for Javascript.

These C# code samples for C# guide developers to speed up coding of the application when using ByteScout PDF Suite. This C# sample code is all you need for your app. Just copy and paste the code, add references (if needs to) and you are all set! Enjoy writing a code with ready-to-use sample codes in C#.

You can download free trial version of ByteScout PDF Suite from our website to see and try many others source code samples for C#.

On-demand (REST Web API) version:
 Web API (on-demand version)

On-premise offline SDK for Windows:
 60 Day Free Trial (on-premise)

Program.cs
      
using System; using Bytescout.PDFExtractor; namespace ExtractAttachments { class Program { static void Main() { // Create Bytescout.PDFExtractor.AttachmentExtractor instance AttachmentExtractor extractor = new AttachmentExtractor(); extractor.RegistrationName = "demo"; extractor.RegistrationKey = "demo"; // Load sample PDF document extractor.LoadDocumentFromFile(@".\attachments.pdf"); for (int i = 0; i < extractor.Count; i++) { Console.WriteLine("Saving attachment: " + extractor.GetFileName(i)); // Save attachment to file extractor.Save(i, extractor.GetFileName(i)); Console.WriteLine("File size: " + extractor.GetSize(i)); } // Cleanup extractor.Dispose(); } } }

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

VIDEO

ON-PREMISE OFFLINE SDK

60 Day Free Trial or Visit ByteScout PDF Suite Home Page

Explore ByteScout PDF Suite Documentation

Explore Samples

Sign Up for ByteScout PDF Suite Online Training

ON-DEMAND REST WEB API

Get Your API Key

Explore Web API Docs

Explore Web API Samples

Tutorials:

prev
next