OCR TOOLS

Power Automate OCR (Developer Tutorial)

Optical Character Recognition (OCR) is the technology that scans text from images, scanned documents, and PDFs to transform it into machine-readable text. OCR enables computers to identify various formats—books, receipts, forms, and photographs—that can be digitized and automated for PDF data extraction. It analyzes the characters in an image and their patterns, then corresponds them to text. This Optical Character Recognition technology is employed in applications of document digitization, automated PDF data extraction and entry, invoice processing, and making scanned PDFs searchable.

OCRs have dramatically improved and can recognize and read different languages, which nowadays are complex in layout understanding, such as tables and columns. Advanced OCR capabilities software also uses pre-processing techniques for images. These include noise removal and contrast adjustment, improving the accuracy of OCR software in reading low-quality images. Three of the most popular OCR tools are the Tesseract OCR engine, Power Automate, and IronOCR, with high accuracy and flexibility. OCRs have become indispensable tools for businesses, researchers, and developers to outsource managing the documentation and the recognition of text.

What is Microsoft Power Automate OCR?

Optical Character Recognition by Microsoft Power Automate: Using this feature, businesses can automate the extraction of text from images, scanned documents, and PDFs into easily editable and machine-readable formats. Being a part of the Microsoft Power Platform, Power Automate desktop and online provides the user with the ability to create flows without necessarily needing any coding abilities. They can automate tedious data entry, process invoices, and digitize documents with the integration of OCR in workflows.

This saves time and minimizes errors. It's indeed a powerful search tool that can support many different formats and languages in Power Automate's OCR function. Built using AI Builder, it supports the use of text recognition in multiple industries. It integrates seamlessly with other Microsoft services, including Excel, SharePoint, and OneDrive, allowing end-to-end automation starting from scanning the document to storing or even sharing it. This helps organizations increase efficiency, streamline document management, and enhance operational accuracy in their activities.

Benefits of Implementing OCR in Power Automate

Implementing OCR in Power Automate has the following advantages:

Time and Labor Saving: Automation of document text extraction saves a significant amount of time and effort that would otherwise be used in manual data entry.

Cost-Effective: User-friendly and accessible, thus eliminating the need for expensive custom software solutions.

Integration: Microsoft Power Automate offers seamless integration with other Microsoft 365 services such as SharePoint, OneDrive, and even Excel.

Scalability: It can handle thousands of documents at once, making it suitable for large businesses.

Reducing Errors: Automating data entry processes minimizes the chance of human error.

How to Work With OCR in Power Automate

Power Automate supports OCR functionality via several different connections, including AI Builder and OneDrive. Here is a step-by-step guide on how to create an OCR-enabled workflow using Power Automate online or desktop:

1. Set up Power Automate

To begin, log into your Power Automate account or sign up if you do not have one. Power Automate is part of Microsoft 365, meaning you already have access if you're using Office 365 or Dynamics 365.

2. Make a New Flow

Open the Create tab, and click on Instant Flow to create a new flow that can be manually initiated.

Name your flow. For example, name it "Before approval" and select the following trigger: When a file is created in a folder (SharePoint or OneDrive) or Manually trigger a flow.

A new Power Automation flow is created, similar to the one shown below.

Power Automate OCR (Developer Tutorial): Figure 5 - New Automation Flow

3. Upload a File to OneDrive or SharePoint

Add an action to upload your document (image or PDF) to OneDrive for Business or SharePoint. This action will trigger the OCR process to extract data. For this demo, we are using a SharePoint Document library.

Power Automate OCR (Developer Tutorial): Figure 6 - Upload File

4. Utilize the OCR Action of the AI Builder

Utilize AI Builder to develop the "Extract text from images" action. AI Builder is a deeply integrated feature of Machine Learning in Power Automate and has pre-trained OCR models that allow users to easily identify text from images or PDFs.

Power Automate OCR (Developer Tutorial): Figure 7 - AI Builder

Select the image file to extract text from.

Power Automate OCR (Developer Tutorial): Figure 8 - Select Image

5. Processing Extracted Data

Once the text is extracted by OCR, it can be processed further. For example:

Store the extracted text in an Excel format: Use the "Add a row" action to insert the extracted text into an Excel file.

Pass the text via Email: Use the "Send an email" action to forward the extracted text to specified recipients.

Store in Database: Use Connectors to push data into SQL Server, SharePoint lists, or other databases for storage.

What is IronOCR?

IronOCR is a powerful .NET OCR library that allows you to extract text with OCR accurately from images, PDFs, and scans. It excels where other libraries may struggle with text recognition due to poor image quality or noisy images and supports over 125 languages, making it perfect for multilingual use cases. IronOCR includes advanced functionalities such as automatic detection of language, image preprocessing, noise removal, skew correction, and conversion of documents to searchable PDFs while preserving the original layout.

Power Automate OCR (Developer Tutorial): Figure 9 - IronOCR

The product can be easily incorporated through simple .NET project APIs, allowing developers to implement OCR in applications they develop. The library is especially useful for document digitization, automated workflows for data entry, and text extraction tasks with high accuracy and scalability for enterprise-level applications. Its ease of use and powerful OCR capabilities are its strengths.

Features of IronOCR

  • Outstanding text extraction precision, even from low-resolution images and noisy scanned documents.
  • Supports more than 125 languages, with automatic language detection for use in varied linguistic environments.
  • Offers tools for image pre-processing, such as noise reduction, skew correction, contrast enhancement, and sharpening, to improve performance on imperfect images.
  • Creates full-text searchable PDFs, converting scanned documents or images to fully searchable PDFs with the original layout.
  • Preserves layout and formatting, maintaining the structure, fonts, and formatting of source documents, essential for complex documents with tables and columns.
  • Batch Processing: Enables batch processing of multiple images or documents in one operation, supporting large-volume document handling.
  • Easy integration with .NET: Supports a simple API for easy integration with .NET applications, allowing developers to implement OCR without significant effort.

Sample Code to perform OCR

using IronOcr;

class Program
{
    static void Main(string[] args)
    {
        // Initialize Iron Tesseract OCR engine
        var Ocr = new IronTesseract();

        // Set language
        Ocr.Language = OcrLanguage.English;

        // Path to the image file
        var inputFile = @"path\to\your\image.png";

        // Read the image and perform OCR
        using (var Input = new OcrInput(inputFile))
        {
            // Perform OCR
            var Result = Ocr.Read(Input);

            // Display the extracted text in the console
            Console.WriteLine("Extracted Text:");
            Console.WriteLine(Result.Text);
        }
    }
}
using IronOcr;

class Program
{
    static void Main(string[] args)
    {
        // Initialize Iron Tesseract OCR engine
        var Ocr = new IronTesseract();

        // Set language
        Ocr.Language = OcrLanguage.English;

        // Path to the image file
        var inputFile = @"path\to\your\image.png";

        // Read the image and perform OCR
        using (var Input = new OcrInput(inputFile))
        {
            // Perform OCR
            var Result = Ocr.Read(Input);

            // Display the extracted text in the console
            Console.WriteLine("Extracted Text:");
            Console.WriteLine(Result.Text);
        }
    }
}
Imports IronOcr

Friend Class Program
	Shared Sub Main(ByVal args() As String)
		' Initialize Iron Tesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set language
		Ocr.Language = OcrLanguage.English

		' Path to the image file
		Dim inputFile = "path\to\your\image.png"

		' Read the image and perform OCR
		Using Input = New OcrInput(inputFile)
			' Perform OCR
			Dim Result = Ocr.Read(Input)

			' Display the extracted text in the console
			Console.WriteLine("Extracted Text:")
			Console.WriteLine(Result.Text)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Conclusion

Although both IronOCR and Power Automate OCR are highly powerful for text recognition, IronOCR is considerably more robust and versatile in its solution to any developer or business needing serious OCR capabilities beyond the simple cases supported by Power Automate OCR. Power Automate's OCR engine is designed for simple workflows and may require an additional subscription.

In contrast, IronOCR stands out by delivering high-quality results, even when dealing with low-quality input images. It supports over 125 languages with well-preserved formatting and layout. Its capabilities for complex document processing and large batch operations are well-supported with advanced image pre-processing options. It is highly customizable in .NET applications.

Power Automate OCR is sufficient for minor automation or integrations strictly within the Microsoft ecosystem, whereas IronOCR excels with maximum accuracy and control, supporting features like searchable PDF creation that accommodate multiple formats.

For organizations seeking a power-critical, customizable OCR solution without platform constraints, IronOCR is recommended. Iron Software offers a variety of library options for developers. Check the library suite page for more details.

Kannaopat Udonpant
Software Engineer
Before becoming a Software Engineer, Kannapat completed a Environmental Resources PhD from Hokkaido University in Japan. While pursuing his degree, Kannapat also became a member of the Vehicle Robotics Laboratory, which is part of the Department of Bioproduction Engineering. In 2022, he leveraged his C# skills to join Iron Software's engineering team, where he focuses on IronPDF. Kannapat values his job because he learns directly from the developer who writes most of the code used in IronPDF. In addition to peer learning, Kannapat enjoys the social aspect of working at Iron Software. When he's not writing code or documentation, Kannapat can usually be found gaming on his PS5 or rewatching The Last of Us.
NEXT >
Easyocr vs Tesseract (OCR Features Comparison)