IRONSOFTWAREHOME
閱讀文件中的表格
using IronOcr;
using System.Linq;

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

using var input = new OcrInput();
input.LoadPdf("table.pdf");

// Perform OCR
var result = ocr.ReadDocumentAdvanced(input);

var cellList = result.Tables.First().CellInfos;
Imports IronOcr
Imports System.Linq

' Instantiate OCR engine
Dim ocr = New IronTesseract()

Using input = New OcrInput()
    input.LoadPdf("table.pdf")

    ' Perform OCR
    Dim result = ocr.ReadDocumentAdvanced(input)

    Dim cellList = result.Tables.First().CellInfos
End Using
NuGet Download
PM > Install-Package IronOcr
閱讀文件中的表格

閱讀文件中的表格

此程式碼範例演示如何使用IronTesseract OCR引擎從PDF文件中提取文字和表格資料。

  1. 建立IronTesseract OCR引擎的實例。
  2. 初始化table.pdf)。
  3. OCR引擎使用OcrResult物件。
  4. 使用CellInfos提取該表的單元格資訊。
  5. 現在,單元格資料列表(cellList)包含了表格的單元格,包括文字內容和其他細節(例如:單元格位置、大小)。
  6. 此方法對於從PDF中提取表格等結構化資料非常有用,允許程式化存取和處理每個表格單元格內的文字。
探索如何使用IronOCR讀取PDF中的表格。
在GitHub上查看

準備開始了嗎?

Nuget Downloads 6,236,385版本:2026.9剛剛發布

Key in blue circle

立即免費取得 30 天試用金鑰

Your trial license will be sent to your email address

無任何限制。100% 解鎖。無需信用卡。

bullet_checked無需信用卡或建立帳號無任何限制。100% 解鎖。無需信用卡。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
獲取您的無義務諮詢
填寫以下表格或發送電子郵件至sales@ironsoftware.com
您的詳細資訊將始終保密。
被全球數百萬工程師信任
Iron Software的客戶標誌
立即獲取您的30天試用金鑰
無需信用卡或帳戶建立