Test in production without watermarks.
Works wherever you need it to.
Get 30 days of fully functional product.
Have it up and running in minutes.
Full access to our support engineering team during your product trial
This tutorial provides a comprehensive guide on using Tesseract in conjunction with IronOCR to recognize text in multiple languages from PDFs and images. First, ensure that IR OCR and the necessary language packs are installed in your project using the Nouget package manager. Begin by importing the required namespaces and setting up IronOCR with a valid license key to unlock its full capabilities. Instantiate the IronOCR Tesseract object to perform optical character recognition, initially using English as the default language. To add support for additional languages, such as Russian, utilize the 'add secondary language' method.
Load a PDF file named 'example.PDF' with text in various languages using the OCR PDF input class. Perform OCR to extract the text content, storing the results in a designated object. To ensure accurate display of multilingual characters, set the console output encoding to Unicode before printing the extracted text to the console.
Further, adjust the primary language to Russian and add Japanese as a secondary language. This modification facilitates the recognition of both Russian and Japanese text. Load an image file, 'example.png', containing multilingual text using the OCR image input class, and execute OCR with the configured language settings. Store the result and print the extracted text from the image to the console.
By following these steps, you can seamlessly extract and recognize text in English, Russian, and Japanese from various file types. This tutorial highlights the effectiveness of using multiple languages with Tesseract and IronOCR, making it straightforward to process multilingual text in PDFs and images. For more tutorials and to start using IronOCR, subscribe to Iron Software and consider signing up for a trial.