ByteScout PDF Extractor SDK - C# - Extract Attachments - ByteScout
Announcement
Our ByteScout SDK products are sunsetting as we focus on expanding new solutions.
Learn More Open modal
Close modal
Announcement Important Update
ByteScout SDK Sunsetting Notice
Our ByteScout SDK products are sunsetting as we focus on our new & improved solutions. Thank you for being part of our journey, and we look forward to supporting you in this next chapter!

ByteScout PDF Extractor SDK – C# – Extract Attachments

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

ByteScout PDF Extractor SDK – C# – Extract Attachments

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(); } } } [/csharp]


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next