跳至页脚内容

文档阅读

使用IronOCR准确提取发票和报告中的文本和数据,并更快地构建功能。

Icon Main related to 文档阅读
文档阅读

1

阅读扫描文档

将物理文档和基于图像的 PDF 准确数字化为机器可读文本。非常适合创建可搜索的档案、自动输入纸质表格中的数据,以及使扫描内容可访问和可索引。我们的引擎擅长处理常见的扫描瑕疵。

了解如何:在 C# 中使用读取扫描文档
using IronOcr;
using System;

// Instantiate OCR engine
var ocr = new IronTesseract();

// Configure OCR engine
using var input = new OcrInput();
input.LoadImage("potter.tiff");

// Perform OCR
OcrResult result = ocr.ReadDocument(input);
Console.WriteLine(result.Text);
C#
2

阅读发票文件

从发票中智能提取结构化数据,实现应付账款工作流程自动化。除了简单的文本提取外,还能捕捉发票号码、到期日、总金额和供应商名称等键值对,甚至可以跨不同的布局和模板。

了解如何:阅读文档中的复杂表格
using IronOcr;

// Instantiate OCR engine
var ocr = new IronTesseract();

// Enable table detection
ocr.Configuration.ReadDataTables = true;
using var input = new OcrPdfInput("sample.pdf");
var result = ocr.Read(input);

// Retrieve the data
var table = result.Tables[0].DataTable;

// Print the retrieved item to the console
Console.WriteLine($"The first item in the table is: {result.Tables[0].DataTable.Rows[0][0]}");
C#
3

读取照片

将智能手机照片和相机图像转化为可用文本。适用于捕捉收据用于费用跟踪、将白板笔记数字化、从产品标签中提取信息或从路标和海报中读取文本的移动应用程序。

了解如何:在 C# 中使用读取照片
using IronOcr;

var ocr = new IronTesseract();
using var inputPhoto = new OcrInput();
inputPhoto.LoadImageFrame("ocr.tiff", 0);

// Read photo
OcrPhotoResult result = ocr.ReadPhoto(inputPhoto);

// Extract the text in the first region
string textinregion = result.TextRegions[0].TextInRegion;

// Print the text in the first region 
Console.WriteLine($"Full Scnned Photo Text: {textinregion}");
C#
4

阅读截图

即时捕捉和处理应用程序窗口、用户界面或网页内容中的屏幕文本。通过读取其他应用程序的用户界面元素,实现与这些应用程序的无缝集成。

了解如何:在 C# 中使用读取屏幕截图
using IronOcr;
using System;
using System.Linq;

// Instantiate OCR engine
var ocr = new IronTesseract();
using var inputScreenshot = new OcrInput();
inputScreenshot.LoadImage("screenshotOCR.png");

// Perform OCR
OcrPhotoResult result = ocr.ReadScreenShot(inputScreenshot);

// Output screenshot information
Console.WriteLine(result.Text);
C#
准备开始了吗?
Nuget 下载 5,167,857 | Version: 2025.11 刚刚发布