Link Search Menu Expand Document

PDF Batch Processing - C#

PDF Extractor SDK sample in C# demonstrating ‘PDF Batch Processing’

using System.IO;
using Bytescout.PDFExtractor;

namespace BatchProcessing
    class Program
        static void Main()
            // Create Bytescout.PDFExtractor.TextExtractor instance
            TextExtractor extractor = new TextExtractor();
            extractor.RegistrationName = "demo";
            extractor.RegistrationKey = "demo";

            // Get PDF files 
            string[] pdfFiles = Directory.GetFiles(".", "*.pdf");

            foreach (string file in pdfFiles)
                // Load document

                // Save extracted text to .txt file
                extractor.SaveTextToFile(Path.ChangeExtension(file, ".txt"));

                // Reset the extractor before load another file

            // Cleanup

Download Source Code (.zip)

Return to the previous page Explore PDF Extractor SDK