跳過到頁腳內容

文件閱讀

準確地從發票和報告中提取文本和數據,使用 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

閱讀發票文件

從發票中智慧地抽取結構化資料,自動化您的應付帳款工作流程。除了簡單的文字擷取之外,還能擷取key-value 對,例如發票號碼、到期日、總金額和廠商名稱,甚至跨越不同的版面設計和範本。

學習如何:在文件 中讀取複雜的表格
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

閱讀截圖

立即擷取並處理應用程式視窗、使用者介面或網頁內容的螢幕文字。透過讀取其他應用程式的 UI 元素,與其他應用程式無縫整合。

學習如何:在 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 剛發表