ByteScout PDF Extractor SDK - C# - Read Hindi Text - 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# – Read Hindi Text

  • Home
  • /
  • Articles
  • /
  • ByteScout PDF Extractor SDK – C# – Read Hindi Text

ByteScout PDF Extractor SDK – C# – Read Hindi Text

Program.cs

using System;
using System.Text;
using Bytescout.PDFExtractor;

namespace ReadHindiText
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                //Files
                string fileName = "hindiText.pdf";
                string destFileName = "extractedText.txt";

                //Read all text from pdf file
                using (TextExtractor extractor = new TextExtractor())
                {
                    // Load PDF document
                    extractor.LoadDocumentFromFile(fileName);

                    //Option 1: Extract all text and write to destination file
                    extractor.SaveTextToFile(destFileName, encoding: Encoding.Unicode);

                    Console.WriteLine("All extracted text (hindi) written successfully to destination text file.");

                    //Option 2: Read all text to string variable
                    //string allText = extractor.GetText();
                }
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message);
            }

            Console.WriteLine();
            Console.WriteLine("Press any key...");
            Console.ReadLine();
        }
    }
}


  Click here to get your Free Trial version of the SDK

Tutorials:

prev
next