PDFTron OCR 替代品 - IronOCR
IronOCR 為 .NET 提供專業的 OCR 功能,整合簡單明瞭,價格透明,支持超過 125 種語言。 相較之下,PDFTron 需要客製化報價及複雜的手動配置來實施 OCR 模組。
什麼是 OCR 技術,為何對企業應用程式如此重要?
光學文字識別(OCR)技術將紙質文件、圖片和 PDF 轉換為機器可讀、可搜尋的文字。 對於管理大批量文件、符合法規要求和推進數位轉型的企業來說,此技術至關重要。 現代 OCR 解決方案提供的不僅僅是簡單的文字提取,還包括條碼識別、多語言支持和結構化資料提取等功能。
企業為何採用 OCR 解決方案?
企業使用 OCR 進行幾個關鍵的業務流程:
- 文件數位化:將紙質檔案轉換為可搜尋的數位儲存庫
- 法規合規管理:從法規文件中提取資料以提供審計追蹤
- 發票處理:透過資料提取來自動化應付帳款流程
- 合同分析:使法律文件可以被搜尋和分析
- 客戶入職:自動處理身份文件和表格
企業選擇 OCR 解決方案的關鍵考量是什麼?
在評估企業部署的 OCR 解決方案時,企業著重於幾個因素:
- 安全性和合規性:SOC2、HIPAA 和特定行業的認證
- 整合複雜性:API 的簡單性和部署時間
- 可擴展性:在高容量處理下的效能
- 總擁有成本:透明的定價與隱性成本
- 供應商穩定性:長期支持和產品路線圖
此分析比較了兩大 OCR 解決方案——PDFTron OCR 與 IronOCR,重點在於安全性、整合性和操作效率的企業需求。
什麼是 PDFTron OCR 和 IronOCR?
PDFTron OCR 有哪些突出的特點?
PDFTron SDK 透過一個需要手動安裝和配置的獨立模組來實施 OCR。 OCR 模組能夠從文件中檢測文字,建立可選擇且可搜尋的內容。 PDFTron SDK 透過其實現支持多達100 種國際語言。 其底層技術使用一個開源的 LSTM 神經網路,改編自Tesseract OCR 引擎。
PDFTron 處理各種圖像格式來進行文字提取,包括僅點陣圖的 PDF。 輸出品質與輸入圖像品質直接相關——300 DPI 解析度的灰階圖像提供最佳識別精度。 系統需要為每個部署環境手動配置,包括獨立模組下載和路徑配置。
PDFTron OCR 提供哪些主要功能?
PDFTron 的 OCR 功能專注於文件處理工作流程:
- 文件可搜尋性:將基於圖像的 PDF 轉換為可搜尋的 PDF 格式
- 商業文件處理:從發票和表單中提取結構化資料
- 書籍數位化:處理多頁掃描的文件
- 車輛識別:從圖像中檢測車牌號碼
- 無障礙支持:為視障使用者啟用文字轉語音功能
- 批次處理:通過手動配置處理多個檔案
- 資料輸入自動化:減少手動轉錄需求
- 名片掃描:從卡片中提取聯繫資訊
IronOCR獨特的地方在哪裡?
IronOCR for .NET 提供可支援企業使用的 OCR 功能,整合簡單明瞭,功能完整。 此程式庫可處理從圖像和 PDF 提取文字,同時提供條碼解碼、世界多國語言支持和結構化資料輸出。IronOCR能夠順利整合至網頁應用、控制台程式、MVC 架構及桌面軟體,透過NuGet 套件安裝即可。
IronOCR 使用先進的Tesseract 5 引擎來在所有 PDF 格式中實現卓越的文字識別、QR 碼檢測和條碼掃描精度。 實施需要的配置極少,可快速在企業環境中部署。 商用授權提供直接的工程支持和完整的文件。
IronOCR提供哪些進階功能?
IronOCR 提供超越基礎 OCR 的專業功能:
- 語言支持:支持包括自定義語言訓練的125+ 國際語言
- 條碼識別:可讀懂20 多種條碼和 QR 格式
- 圖像格式支持:處理多頁 TIFF 和 GIF 文件
- 圖像增強:自動校正低質量掃描
- 效能優化:支持多執行緒處理以進行同時處理
- 結構化輸出:分層提取資料(頁面、段落、行、詞、字元)
- 跨平台支持:與Windows、Linux 和macOS原生相容
- 非同步處理:提供非同步 OCR 操作以改善效能
- 區域檢測:針對文件中的特定區域進行目標處理
如何在 Visual Studio 中建立新專案?
在 Visual Studio 中設置 OCR 實施的專案需要適當的配置。 打開 Visual Studio 並轉到文件選單。 選擇"新專案"並從可用模板中選擇 "控制台應用程式"。 控制台應用提供了一個理想的環境來測試 OCR 功能,然後才將其整合到較大的系統中。
Visual Studio 的專案模板選擇提供各種 .NET 應用程式型別,適合 OCR 實施,控制台應用提供最簡單的測試環境
輸入描述性專案名稱並指定目標目錄路徑。 點擊"建立"按鈕並選擇合適的 .NET Framework 版本——建議使用 .NET 6.0 或更高版本以獲得與現代 OCR 程式庫的最佳相容性。
Visual Studio 將自動生成完整的專案結構。 Program.cs 文件會立即打開,提供您的 OCR 實施程式碼的入口點。 此結構支持簡單的測試場景和複雜的企業應用。
生成的 C# 專案模板提供了一個良好的起點,用於實施帶有適當命名空間組織的 OCR 功能
我如何安裝這些 OCR 程式庫?
安裝 PDFTron OCR 的步驟是什麼?
PDFTron OCR 需要手動安裝和配置過程。 從官方 PDFTron 下載頁面下載 OCR 模組作為 zip 文件。 提取內容並將其手動整合到您的專案結構中。 這種安裝方法與現代套件管理方法形成對比,需進行額外的配置步驟。
我需要哪些 PDFTron 的前置條件?
PDFTron 的實施需要特定的開發環境配置:
Visual Studio 要求:安裝帶有 .NET Desktop Development 工作負載和 .NET Framework 4.5.1+ 開發工具的 Visual Studio。 這些元件確保與 PDFTron's SDK 要求相容。 從 PDFTron's .NET SDK 頁面下載 .NET PDF SDK。
如何配置 PDFTron's 初始設置?
將下載的 SDK 提取到指定資料夾。 在整個指南中,PDFNET_BASE 代表您的提取目錄路徑:
// Define the base path for PDFTron SDK files
string PDFNET_BASE = @"C:\PDFTron\PDFNetDotNet4\";
// Configure paths for libraries and resources
string libPath = Path.Combine(PDFNET_BASE, "Lib");
string ocrModulePath = Path.Combine(PDFNET_BASE, "OCRModule");
// Define the base path for PDFTron SDK files
string PDFNET_BASE = @"C:\PDFTron\PDFNetDotNet4\";
// Configure paths for libraries and resources
string libPath = Path.Combine(PDFNET_BASE, "Lib");
string ocrModulePath = Path.Combine(PDFNET_BASE, "OCRModule");
' Define the base path for PDFTron SDK files
Dim PDFNET_BASE As String = "C:\PDFTron\PDFNetDotNet4\"
' Configure paths for libraries and resources
Dim libPath As String = Path.Combine(PDFNET_BASE, "Lib")
Dim ocrModulePath As String = Path.Combine(PDFNET_BASE, "OCRModule")
如何將 PDFTron 整合到我的應用中?
PDFTron 整合涉及多個手動配置步驟:
- 構建專案結構:在 Visual Studio 中開發 .NET Framework 控制台應用程式
- 複製所需的庫:將 PDFNET_BASE 的 Lib 資料夾傳送到您的專案目錄
- 新增引用:在解決方案資源管理器中右鍵單擊引用並選擇"新增引用"
- 配置 PDFNetLoader:瀏覽至 Lib 資料夾並新增 PDFNetLoader.dll
- 新增特定平台的 DLL:根據目標平台從 x86 或 x64 資料夾中包括 PDFNet.dll
- 禁用本地複製:將 PDFNet.dll 的本地複製屬性設置為 False,以防止部署問題
配置 PDFNet.dll 引用屬性需要禁用本地複製,以確保在不同部署環境中正確運行
安裝IronOCR的步驟是什麼?
IronOCR 提供了多種符合現代開發實踐的簡化安裝方式:
如何使用 Visual Studio 安裝 IronOCR?
Visual Studio 的整合NuGet 套件管理器提供最簡單的安裝方法。 通過工具選單存取套件管理器:
Visual Studio 工具選單提供直接進入 NuGet 套件管理器的途徑,無需手動配置即可順利安裝 IronOCR
在套件瀏覽器中搜索"IronOCR",查看可用的套件和語言包:
NuGet 套件管理器顯示IronOCR的完整語言支持,透過單獨的套件進行安裝,適用於特定地區需求
如何使用命令行安裝 IronOCR?
包管理器控制台提供自動化場合的命令行安裝:
Install-Package IronOcr
這單一命令能夠自動處理所有依賴性和配置,與 PDFTron 的手動設置需求形成對比。
有什麼替代安裝方法?
直接 NuGet 下載:
- Go to the IronOCR NuGet page
- 直接下載 .nupkg 文件
- 雙擊以自動安裝
- 重新載入您的解決方案以存取IronOCR功能
手動 DLL 參考:
- 從 IronOCR 套件頁面下載
- 解壓縮下載的檔案
- 通過解決方案資源管理器新增引用
- 不需其他配置
如何對圖像執行 OCR?
這兩個程式庫都提供圖像到文字的轉換功能,但實施方式不同。IronOCR通過直觀的 API 簡化了過程,而 PDFTron 則需要額外的配置步驟。
PDFTron 如何處理圖像 OCR?
PDFTron 的圖像處理需要在 OCR 操作前進行格式轉換:
// PDFTron image conversion and OCR workflow
PDFDoc doc = new PDFDoc("input.pdf");
// Convert to various formats before OCR
Convert.ToSvg(doc, "output.svg");
Convert.ToXps("input.pdf", "output.xps");
// Configure TIFF conversion with OCR preparation
Convert.TiffOutputOptions tiff_options = new Convert.TiffOutputOptions();
tiff_options.SetDPI(300); // Optimal DPI for OCR
tiff_options.SetDither(true);
tiff_options.SetMono(true);
Convert.ToTiff("input.pdf", "output.tiff", tiff_options);
// Additional format conversions
Convert.ToXod("input.pdf", "output.xod");
Convert.ToHtml("input.pdf", "output.html");
// OCR module must be separately configured for text extraction
// PDFTron image conversion and OCR workflow
PDFDoc doc = new PDFDoc("input.pdf");
// Convert to various formats before OCR
Convert.ToSvg(doc, "output.svg");
Convert.ToXps("input.pdf", "output.xps");
// Configure TIFF conversion with OCR preparation
Convert.TiffOutputOptions tiff_options = new Convert.TiffOutputOptions();
tiff_options.SetDPI(300); // Optimal DPI for OCR
tiff_options.SetDither(true);
tiff_options.SetMono(true);
Convert.ToTiff("input.pdf", "output.tiff", tiff_options);
// Additional format conversions
Convert.ToXod("input.pdf", "output.xod");
Convert.ToHtml("input.pdf", "output.html");
// OCR module must be separately configured for text extraction
' PDFTron image conversion and OCR workflow
Dim doc As New PDFDoc("input.pdf")
' Convert to various formats before OCR
Convert.ToSvg(doc, "output.svg")
Convert.ToXps("input.pdf", "output.xps")
' Configure TIFF conversion with OCR preparation
Dim tiff_options As New Convert.TiffOutputOptions()
tiff_options.SetDPI(300) ' Optimal DPI for OCR
tiff_options.SetDither(True)
tiff_options.SetMono(True)
Convert.ToTiff("input.pdf", "output.tiff", tiff_options)
' Additional format conversions
Convert.ToXod("input.pdf", "output.xod")
Convert.ToHtml("input.pdf", "output.html")
' OCR module must be separately configured for text extraction
IronOCR如何處理圖像 OCR?
// InitializeIronOCRwith improved settings
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.EnglishBest;
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5;
using (var Input = new OcrInput())
{
// Add single or multiple images
Input.AddImage(@"invoice.png");
Input.AddImage(@"receipt.jpg");
// Configure image preprocessing
Input.DeNoise();
Input.Deskew();
Input.EnhanceResolution(300);
// Perform OCR with structured output
var Result = Ocr.Read(Input);
// Access results with confidence scores
Console.WriteLine($"Text: {Result.Text}");
Console.WriteLine($"Confidence: {Result.Confidence}%");
// Extract structured data
foreach (var page in Result.Pages)
{
foreach (var paragraph in page.Paragraphs)
{
Console.WriteLine(paragraph.Text);
}
}
}
// InitializeIronOCRwith improved settings
var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.EnglishBest;
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5;
using (var Input = new OcrInput())
{
// Add single or multiple images
Input.AddImage(@"invoice.png");
Input.AddImage(@"receipt.jpg");
// Configure image preprocessing
Input.DeNoise();
Input.Deskew();
Input.EnhanceResolution(300);
// Perform OCR with structured output
var Result = Ocr.Read(Input);
// Access results with confidence scores
Console.WriteLine($"Text: {Result.Text}");
Console.WriteLine($"Confidence: {Result.Confidence}%");
// Extract structured data
foreach (var page in Result.Pages)
{
foreach (var paragraph in page.Paragraphs)
{
Console.WriteLine(paragraph.Text);
}
}
}
Imports IronOcr
' Initialize IronOCR with improved settings
Dim Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.EnglishBest
Ocr.Configuration.TesseractVersion = TesseractVersion.Tesseract5
Using Input = New OcrInput()
' Add single or multiple images
Input.AddImage("invoice.png")
Input.AddImage("receipt.jpg")
' Configure image preprocessing
Input.DeNoise()
Input.Deskew()
Input.EnhanceResolution(300)
' Perform OCR with structured output
Dim Result = Ocr.Read(Input)
' Access results with confidence scores
Console.WriteLine($"Text: {Result.Text}")
Console.WriteLine($"Confidence: {Result.Confidence}%")
' Extract structured data
For Each page In Result.Pages
For Each paragraph In page.Paragraphs
Console.WriteLine(paragraph.Text)
Next
Next
End Using
有哪些圖像預處理選項?
IronOCR 提供完整的圖像增強能力:
using (var Input = new OcrInput())
{
Input.AddImage("low-quality-scan.jpg");
// Apply image corrections
Input.DeNoise(); // Remove image noise
Input.Deskew(); // Correct rotation
Input.Scale(200); // Upscale low-res images
Input.Binarize(); // Convert to black/white
Input.EnhanceContrast(); // Improve text visibility
Input.Sharpen(); // Improve edges
// Process with optimizations
var Result = Ocr.Read(Input);
}
using (var Input = new OcrInput())
{
Input.AddImage("low-quality-scan.jpg");
// Apply image corrections
Input.DeNoise(); // Remove image noise
Input.Deskew(); // Correct rotation
Input.Scale(200); // Upscale low-res images
Input.Binarize(); // Convert to black/white
Input.EnhanceContrast(); // Improve text visibility
Input.Sharpen(); // Improve edges
// Process with optimizations
var Result = Ocr.Read(Input);
}
Imports System
Using Input As New OcrInput()
Input.AddImage("low-quality-scan.jpg")
' Apply image corrections
Input.DeNoise() ' Remove image noise
Input.Deskew() ' Correct rotation
Input.Scale(200) ' Upscale low-res images
Input.Binarize() ' Convert to black/white
Input.EnhanceContrast() ' Improve text visibility
Input.Sharpen() ' Improve edges
' Process with optimizations
Dim Result = Ocr.Read(Input)
End Using
OcrInput 類別可自動處理多幀 TIFF 圖像:
// Process multi-page TIFF files
Input.AddMultiFrameTiff("multipage-document.tiff");
// Each frame processes as a separate page
// Process multi-page TIFF files
Input.AddMultiFrameTiff("multipage-document.tiff");
// Each frame processes as a separate page
' Process multi-page TIFF files
Input.AddMultiFrameTiff("multipage-document.tiff")
' Each frame processes as a separate page
IronOCR 展示了準確的圖片文字和數字提取效能,同時可靠地處理字母和數字內容
如何對 PDF 文件進行 OCR?
PDF 處理對於 OCR 技術是企業的一個重要使用場景。IronOCR在PDF 文字提取方面表現卓越,提供全面的格式支持。
PDFTron 如何處理 PDF 文件?
PDFTron 的 PDF 處理需要廣泛的配置和手動設置:
// PDFTron PDF processing example (abbreviated)
class PDFProcessor
{
static bool ConvertSpecificFormats()
{
bool err = false;
try
{
using (PDFDoc pdfdoc = new PDFDoc())
{
// Convert XPS to PDF first
Console.WriteLine("Converting from XPS");
pdftron.PDF.Convert.FromXps(pdfdoc, inputPath + "document.xps");
pdfdoc.Save(outputPath + "converted.pdf", SDFDoc.SaveOptions.e_remove_unused);
// OCR module processes separately
// Requires additional configuration not shown
}
}
catch (PDFNetException e)
{
Console.WriteLine(e.Message);
err = true;
}
return err;
}
}
// PDFTron PDF processing example (abbreviated)
class PDFProcessor
{
static bool ConvertSpecificFormats()
{
bool err = false;
try
{
using (PDFDoc pdfdoc = new PDFDoc())
{
// Convert XPS to PDF first
Console.WriteLine("Converting from XPS");
pdftron.PDF.Convert.FromXps(pdfdoc, inputPath + "document.xps");
pdfdoc.Save(outputPath + "converted.pdf", SDFDoc.SaveOptions.e_remove_unused);
// OCR module processes separately
// Requires additional configuration not shown
}
}
catch (PDFNetException e)
{
Console.WriteLine(e.Message);
err = true;
}
return err;
}
}
Imports pdftron
Imports pdftron.PDF
Imports System
Class PDFProcessor
Private Shared Function ConvertSpecificFormats() As Boolean
Dim err As Boolean = False
Try
Using pdfdoc As New PDFDoc()
' Convert XPS to PDF first
Console.WriteLine("Converting from XPS")
pdftron.PDF.Convert.FromXps(pdfdoc, inputPath & "document.xps")
pdfdoc.Save(outputPath & "converted.pdf", SDFDoc.SaveOptions.e_remove_unused)
' OCR module processes separately
' Requires additional configuration not shown
End Using
Catch e As PDFNetException
Console.WriteLine(e.Message)
err = True
End Try
Return err
End Function
End Class
IronOCR如何處理 PDF 文件?
IronOCR 通過智能處理簡化PDF OCR 操作:
// Process entire PDF with automatic page handling
var Ocr = new IronTesseract();
using (var Input = new OcrInput())
{
// Add complete PDF - all pages processed automatically
Input.AddPdf("annual-report.pdf");
// Or process specific pages only
Input.AddPdfPage("large-document.pdf", pageNumber: 5);
// Process multiple specific pages
IEnumerable<int> pages = new List<int> { 1, 3, 5, 7, 9 };
Input.AddPdfPages("selected-pages.pdf", pages);
// Handle password-protected PDFs
Input.AddPdf("secure-document.pdf", password: "admin123");
// Configure OCR settings
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd;
// Execute OCR
var Result = Ocr.Read(Input);
// Save results in multiple formats
Result.SaveAsTextFile("extracted-text.txt");
Result.SaveAsHocrFile("structured-output.html");
Result.SaveAsSearchablePdf("searchable-version.pdf");
}
// Process entire PDF with automatic page handling
var Ocr = new IronTesseract();
using (var Input = new OcrInput())
{
// Add complete PDF - all pages processed automatically
Input.AddPdf("annual-report.pdf");
// Or process specific pages only
Input.AddPdfPage("large-document.pdf", pageNumber: 5);
// Process multiple specific pages
IEnumerable<int> pages = new List<int> { 1, 3, 5, 7, 9 };
Input.AddPdfPages("selected-pages.pdf", pages);
// Handle password-protected PDFs
Input.AddPdf("secure-document.pdf", password: "admin123");
// Configure OCR settings
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd;
// Execute OCR
var Result = Ocr.Read(Input);
// Save results in multiple formats
Result.SaveAsTextFile("extracted-text.txt");
Result.SaveAsHocrFile("structured-output.html");
Result.SaveAsSearchablePdf("searchable-version.pdf");
}
Imports IronTesseract
' Process entire PDF with automatic page handling
Dim Ocr As New IronTesseract()
Using Input As New OcrInput()
' Add complete PDF - all pages processed automatically
Input.AddPdf("annual-report.pdf")
' Or process specific pages only
Input.AddPdfPage("large-document.pdf", pageNumber:=5)
' Process multiple specific pages
Dim pages As IEnumerable(Of Integer) = New List(Of Integer) From {1, 3, 5, 7, 9}
Input.AddPdfPages("selected-pages.pdf", pages)
' Handle password-protected PDFs
Input.AddPdf("secure-document.pdf", password:="admin123")
' Configure OCR settings
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd
' Execute OCR
Dim Result = Ocr.Read(Input)
' Save results in multiple formats
Result.SaveAsTextFile("extracted-text.txt")
Result.SaveAsHocrFile("structured-output.html")
Result.SaveAsSearchablePdf("searchable-version.pdf")
End Using
IronOCR支持哪些進階的 PDF 功能?
IronOCR 提供專業的 PDF 處理功能:
// Advanced PDF processing with region targeting
var Ocr = new IronTesseract();
using (var Input = new OcrInput())
{
// Define specific regions for targeted OCR
var headerArea = new System.Drawing.Rectangle(0, 0, 800, 200);
var contentArea = new System.Drawing.Rectangle(50, 250, 700, 800);
// Add PDF with region specifications
Input.AddPdf("invoice.pdf");
// Process with confidence analysis
var Result = Ocr.Read(Input);
// Extract data with structure preservation
foreach (var page in Result.Pages)
{
Console.WriteLine($"Page {page.PageNumber}:");
// Extract tables
var tables = page.Tables;
foreach (var table in tables)
{
// Process tabular data
Console.WriteLine($"Table found: {table.RowCount}x{table.ColumnCount}");
}
// Extract paragraphs with formatting
foreach (var paragraph in page.Paragraphs)
{
Console.WriteLine($"Paragraph: {paragraph.Text}");
Console.WriteLine($"Font Size: {paragraph.FontSize}");
}
}
}
// Advanced PDF processing with region targeting
var Ocr = new IronTesseract();
using (var Input = new OcrInput())
{
// Define specific regions for targeted OCR
var headerArea = new System.Drawing.Rectangle(0, 0, 800, 200);
var contentArea = new System.Drawing.Rectangle(50, 250, 700, 800);
// Add PDF with region specifications
Input.AddPdf("invoice.pdf");
// Process with confidence analysis
var Result = Ocr.Read(Input);
// Extract data with structure preservation
foreach (var page in Result.Pages)
{
Console.WriteLine($"Page {page.PageNumber}:");
// Extract tables
var tables = page.Tables;
foreach (var table in tables)
{
// Process tabular data
Console.WriteLine($"Table found: {table.RowCount}x{table.ColumnCount}");
}
// Extract paragraphs with formatting
foreach (var paragraph in page.Paragraphs)
{
Console.WriteLine($"Paragraph: {paragraph.Text}");
Console.WriteLine($"Font Size: {paragraph.FontSize}");
}
}
}
Imports IronTesseract
Imports System.Drawing
' Advanced PDF processing with region targeting
Dim Ocr As New IronTesseract()
Using Input As New OcrInput()
' Define specific regions for targeted OCR
Dim headerArea As New Rectangle(0, 0, 800, 200)
Dim contentArea As New Rectangle(50, 250, 700, 800)
' Add PDF with region specifications
Input.AddPdf("invoice.pdf")
' Process with confidence analysis
Dim Result = Ocr.Read(Input)
' Extract data with structure preservation
For Each page In Result.Pages
Console.WriteLine($"Page {page.PageNumber}:")
' Extract tables
Dim tables = page.Tables
For Each table In tables
' Process tabular data
Console.WriteLine($"Table found: {table.RowCount}x{table.ColumnCount}")
Next
' Extract paragraphs with formatting
For Each paragraph In page.Paragraphs
Console.WriteLine($"Paragraph: {paragraph.Text}")
Console.WriteLine($"Font Size: {paragraph.FontSize}")
Next
Next
End Using
兩者如何處理 PDF 匯出?
IronOCR 為處理後的 PDF 提供多種匯出選項:
//IronOCRexport capabilities
var Result = Ocr.Read(Input);
// Export as searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf");
// Export as hOCR (HTML with OCR data)
Result.SaveAsHocrFile("output.hocr");
// Export with custom formatting
string html = Result.AsHocrString();
string text = Result.Text;
byte[] pdfBytes = Result.AsByteArray();
//IronOCRexport capabilities
var Result = Ocr.Read(Input);
// Export as searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf");
// Export as hOCR (HTML with OCR data)
Result.SaveAsHocrFile("output.hocr");
// Export with custom formatting
string html = Result.AsHocrString();
string text = Result.Text;
byte[] pdfBytes = Result.AsByteArray();
'IronOCR export capabilities
Dim Result = Ocr.Read(Input)
' Export as searchable PDF
Result.SaveAsSearchablePdf("searchable.pdf")
' Export as hOCR (HTML with OCR data)
Result.SaveAsHocrFile("output.hocr")
' Export with custom formatting
Dim html As String = Result.AsHocrString()
Dim text As String = Result.Text
Dim pdfBytes As Byte() = Result.AsByteArray()
IronOCR如何讀取條碼?
IronOCR 將完整的條碼讀取功能直接整合到 OCR 工作流程中:
// ConfigureIronOCRfor barcode detection
var Ocr = new IronTesseract();
Ocr.Configuration.ReadBarCodes = true;
using (var Input = new OcrInput())
{
// Add images or PDFs containing barcodes
Input.AddImage("shipping-label.png");
Input.AddPdf("inventory-report.pdf");
// Process with barcode detection
var Result = Ocr.Read(Input);
// Extract barcode data
foreach (var barcode in Result.Barcodes)
{
Console.WriteLine($"Type: {barcode.Type}");
Console.WriteLine($"Value: {barcode.Value}");
Console.WriteLine($"Location: {barcode.X},{barcode.Y}");
// Handle different barcode types
switch (barcode.Type)
{
case BarcodeType.QRCode:
ProcessQRCode(barcode.Value);
break;
case BarcodeType.Code128:
ProcessShippingCode(barcode.Value);
break;
case BarcodeType.DataMatrix:
ProcessInventoryCode(barcode.Value);
break;
}
}
// Combined text and barcode extraction
Console.WriteLine($"Text found: {Result.Text}");
Console.WriteLine($"Barcodes found: {Result.Barcodes.Count()}");
}
// ConfigureIronOCRfor barcode detection
var Ocr = new IronTesseract();
Ocr.Configuration.ReadBarCodes = true;
using (var Input = new OcrInput())
{
// Add images or PDFs containing barcodes
Input.AddImage("shipping-label.png");
Input.AddPdf("inventory-report.pdf");
// Process with barcode detection
var Result = Ocr.Read(Input);
// Extract barcode data
foreach (var barcode in Result.Barcodes)
{
Console.WriteLine($"Type: {barcode.Type}");
Console.WriteLine($"Value: {barcode.Value}");
Console.WriteLine($"Location: {barcode.X},{barcode.Y}");
// Handle different barcode types
switch (barcode.Type)
{
case BarcodeType.QRCode:
ProcessQRCode(barcode.Value);
break;
case BarcodeType.Code128:
ProcessShippingCode(barcode.Value);
break;
case BarcodeType.DataMatrix:
ProcessInventoryCode(barcode.Value);
break;
}
}
// Combined text and barcode extraction
Console.WriteLine($"Text found: {Result.Text}");
Console.WriteLine($"Barcodes found: {Result.Barcodes.Count()}");
}
Imports IronOcr
' Configure IronOCR for barcode detection
Dim Ocr As New IronTesseract()
Ocr.Configuration.ReadBarCodes = True
Using Input As New OcrInput()
' Add images or PDFs containing barcodes
Input.AddImage("shipping-label.png")
Input.AddPdf("inventory-report.pdf")
' Process with barcode detection
Dim Result = Ocr.Read(Input)
' Extract barcode data
For Each barcode In Result.Barcodes
Console.WriteLine($"Type: {barcode.Type}")
Console.WriteLine($"Value: {barcode.Value}")
Console.WriteLine($"Location: {barcode.X},{barcode.Y}")
' Handle different barcode types
Select Case barcode.Type
Case BarcodeType.QRCode
ProcessQRCode(barcode.Value)
Case BarcodeType.Code128
ProcessShippingCode(barcode.Value)
Case BarcodeType.DataMatrix
ProcessInventoryCode(barcode.Value)
End Select
Next
' Combined text and barcode extraction
Console.WriteLine($"Text found: {Result.Text}")
Console.WriteLine($"Barcodes found: {Result.Barcodes.Count()}")
End Using
如何處理特定的文件區域?
IronOCR 支持目標區域處理以改善效能:
// Target specific areas in documents
var Ocr = new IronTesseract();
using (var Input = new OcrInput())
{
// Define regions for form fields
var nameFieldArea = new Rectangle(100, 200, 400, 50);
var addressArea = new Rectangle(100, 300, 400, 150);
var signatureArea = new Rectangle(100, 500, 300, 100);
// Add document with region specifications
Input.Add("application-form.pdf", nameFieldArea);
// Process specific region
var nameResult = Ocr.Read(Input);
Console.WriteLine($"Name: {nameResult.Text}");
// Process multiple regions
Input.Clear();
Input.Add("application-form.pdf", addressArea);
var addressResult = Ocr.Read(Input);
Console.WriteLine($"Address: {addressResult.Text}");
}
// Target specific areas in documents
var Ocr = new IronTesseract();
using (var Input = new OcrInput())
{
// Define regions for form fields
var nameFieldArea = new Rectangle(100, 200, 400, 50);
var addressArea = new Rectangle(100, 300, 400, 150);
var signatureArea = new Rectangle(100, 500, 300, 100);
// Add document with region specifications
Input.Add("application-form.pdf", nameFieldArea);
// Process specific region
var nameResult = Ocr.Read(Input);
Console.WriteLine($"Name: {nameResult.Text}");
// Process multiple regions
Input.Clear();
Input.Add("application-form.pdf", addressArea);
var addressResult = Ocr.Read(Input);
Console.WriteLine($"Address: {addressResult.Text}");
}
Imports IronTesseract
' Target specific areas in documents
Dim Ocr As New IronTesseract()
Using Input As New OcrInput()
' Define regions for form fields
Dim nameFieldArea As New Rectangle(100, 200, 400, 50)
Dim addressArea As New Rectangle(100, 300, 400, 150)
Dim signatureArea As New Rectangle(100, 500, 300, 100)
' Add document with region specifications
Input.Add("application-form.pdf", nameFieldArea)
' Process specific region
Dim nameResult = Ocr.Read(Input)
Console.WriteLine($"Name: {nameResult.Text}")
' Process multiple regions
Input.Clear()
Input.Add("application-form.pdf", addressArea)
Dim addressResult = Ocr.Read(Input)
Console.WriteLine($"Address: {addressResult.Text}")
End Using
這些 OCR 解決方案支援哪些企業使用情境?
企業在何時應選擇 IronOCR?
IronOCR 在需要快速部署和可靠性能的企業場景中表現出色:
金融服務合規
- 自動化發票處理,提供表格提取
- 將銀行對帳單數位化以供審計追蹤
- 利用可搜尋 PDF 生成來分析合同
- 透過資料提取來處理法規文件
醫療文件管理
- 保持 HIPAA 合規性的病人記錄數位化
- 處理保險索賠表單
- 高精度提取處方文字
- 醫療報告的可搜尋性以便於研究
法律文件處理
- 保留元資料的案件文件數位化
- 合同比較與分析
- 在大規模上的發現文件處理
- 法院文件可搜尋性
免費支持與產品更新:每一份授權將直接得到產品背後團隊的支持,並附帶一年的免費產品更新。 隨時可以進行購買擴展。
組織何時可能考慮 PDFTron?
儘管複雜性,但 PDFTron 可能適合某些情況:
現有的 PDFTron 基礎設施
- 已經使用 PDFTron 進行 PDF 操作的組織
- 擁有 PDFTron 專業知識的團隊
- 需要特定 PDFTron 整合的系統
自定義 OCR 工作流程
- 極專門化的文件處理需求
- 與專有的 PDFTron 模組整合
- 與傳統系統的相容性要求
使用者評論和案例分析顯示了什麼?
企業使用者如何評價 IronOCR?
根據已驗證的使用者反饋和實施案例分析:
全球製造公司(財富 500 強)
"IronOCR 將我們的發票處理時間縮短了 75%。 多語言支持完美應對我們的國際文件處理,且在低品質掃描上的準確性超出了我們的預期。 整合比我們預算兩周少了兩天。"
醫療技術提供者
"HIPAA 合規是我們最主要的關心。IronOCR的內部部署選項和透明的安全模型使得批准過程變得簡單。 非同步處理能力高效應對我們的高峰負荷。"
法律服務公司
"我們每月處理成千上萬的發現文件。IronOCR的區域檢測準確提取特定表單欄位,而可搜尋的 PDF 輸出完美整合到我們的文件管理系統。"
PDFTron 使用者的常見經驗是什麼?
PDFTron 使用者報告了各種經驗:
企業軟體開發者
"PDFTron 的 OCR 模組起效,但設置的複雜性導致部署延遲。 我們需要諮詢顧問協助初始配置。 缺乏透明的定價使得預算編制變得困難。"
IT 基礎架構經理
"手動安裝過程不適合我們的自動化部署管道。 每個伺服器需要單獨的配置,與基於 NuGet 的解決方案相比,使得擴展成為挑戰。"
授權模式與總擁有成本是什麼?
IronOCR如何結構其授權?
IronOCR 提供透明、永久授權,並具有明確的定價級別:
Lite License - $999
- 1 位開發者
- 1 個地點
- 1 項目
- 永久授權
- 1 年的支持和更新
- 電子郵件支持存取
- 非常適合小型團隊或概念驗證專案
Professional License - $2,999
- 10 位開發者
- 10 個地點
- 10 項目
- 永久授權
- 1 年的支持和更新
- 優先電子郵件支持
- 適合部門級部署
Unlimited License - $5,999
- 無限開發者
- 無限地點
- 無限項目
- 永久授權
- 1 年的支持和更新
- 優先電話與電子郵件支持
- 全公司部署權限
額外福利
IronOCR 的透明定價模式從個別開發者擴展到企業部署,無隱性費用或運行時成本
PDFTron 如何結構其授權?
PDFTron 採用無公布價格的客製化報價模式:
自訂企業授權
- 定價需銷售諮詢
- 根據使用量的變動成本
- 針對平台的不同定價(網頁、移動、桌面裝置成本不同)
- 年度或者多年期合約
- 可能會有部署限制
- OEM 與 SaaS 需要單獨談判
授權考量
- 沒有公布價格的透明性
- 獲得價格批准的銷售週期延長
- 預期不到的成本上升可能
- 需要複雜的合約談判
- 使用監控與合規開銷
PDFTron 的自訂定價模式需要直接銷售參與,沒有透明的成本結構,讓預算規劃更為複雜
總擁有成本比較是什麼?
在評估總擁有成本時,考慮以下因素:
| 成本因數 | IronOCR | PDFTron |
|---|---|---|
| 初始授權 | $5,999(透明) | 需要客製化報價 |
| 安裝時間 | 5 分鐘經由 NuGet | 2-4 小時手動設置 |
| 開發者訓練 | 極少——直觀的API | 廣泛——複雜的配置 |
| 部署複雜性 | 透過套件管理自動化 | 每個伺服器手動配置 |
| 持續支持 | 包含首年 | 依合約而定 |
| 擴展成本 | 可預測的級別升級 | 需重新談判 |
| 隱藏費用 | None | 可能有針對平台的費用 |
效能與可擴展性如何比較?
IronOCR的效能特徵是什麼?
IronOCR 通過多項優化顯示出專業效能:
多執行緒支持
// Configure parallel processing
var Ocr = new IronTesseract();
Ocr.Configuration.ReadMultithreaded = true;
Ocr.Configuration.MaxThreads = Environment.ProcessorCount;
// Process multiple documents concurrently
var tasks = new List<Task<OcrResult>>();
foreach (var file in documentFiles)
{
tasks.Add(Task.Run(() =>
{
using (var input = new OcrInput())
{
input.AddPdf(file);
return Ocr.Read(input);
}
}));
}
var results = await Task.WhenAll(tasks);
// Configure parallel processing
var Ocr = new IronTesseract();
Ocr.Configuration.ReadMultithreaded = true;
Ocr.Configuration.MaxThreads = Environment.ProcessorCount;
// Process multiple documents concurrently
var tasks = new List<Task<OcrResult>>();
foreach (var file in documentFiles)
{
tasks.Add(Task.Run(() =>
{
using (var input = new OcrInput())
{
input.AddPdf(file);
return Ocr.Read(input);
}
}));
}
var results = await Task.WhenAll(tasks);
' Configure parallel processing
Dim Ocr As New IronTesseract()
Ocr.Configuration.ReadMultithreaded = True
Ocr.Configuration.MaxThreads = Environment.ProcessorCount
' Process multiple documents concurrently
Dim tasks As New List(Of Task(Of OcrResult))()
For Each file In documentFiles
tasks.Add(Task.Run(Function()
Using input As New OcrInput()
input.AddPdf(file)
Return Ocr.Read(input)
End Using
End Function))
Next
Dim results = Await Task.WhenAll(tasks)
記憶體效率
- 支持大文件的流模式
- 自動記憶體管理
- 提供逐頁處理選項
- 可配置的快取設置
效能指標
- 單頁處理:通常為 0.5-2 秒
- 批次處理:高達 100 頁/分鐘
- 記憶體使用:200-500MB 適合典型文件
- CPU 使用:根據可用核心進行伸縮
PDFTron 的效能特徵是什麼?
PDFTron 的效能嚴重依賴於配置:
處理速度
- 需要手動優化
- 效能因平台而異
- OCR 模組增加處理負擔
- 多執行緒文件有限
擴展性挑戰
- 每個實例需手動伺服器配置
- 無內建負載平衡
- 複雜的分佈式處理設置
- 需要平台特定的優化
哪個 OCR 解決方案最符合企業需求?
為什麼多數企業選擇 IronOCR?
IronOCR 在企業 OCR 實施中以幾個關鍵因素脫穎而出:
快速部署 通過 NuGet 簡單安裝將實現時間從數天減少到數小時。 企業報告在單個下午而非數週的時間內即可成功完成概念驗證。
透明的總成本 固定、公布的價格使得不需冗長的銷售週期的準確預算成為可能。 永久授權模式消除了自訂報價解決方案常見的持續費用不確定性。
優越的開發者體驗 直觀的 API 減少了訓練需求並加速開發。 完整的文件和程式碼範例允許自行實施,無需供應商顧問。
專業功能 內建支持125+ 語言、條碼讀取和進階圖像處理滿足多樣的企業需求,無需額外模組。
合規和安全 內部部署選項滿足法規要求。 透明的架構可以在無供應商干預下進行安全審計。
PDFTron 在何時可能會被考慮?
PDFTron 只有在特定情景下才有價值:
- 需要增加 OCR 功能的現有 PDFTron 基礎設施
- 與 PDFTron 平台的合同義務
- 已基於 PDFTron 構建的極專門化工作流程
實施的最佳實踐是什麼?
使用IronOCR成功進行企業 OCR 部署的方式:
結論與建議
在對兩者 OCR 解決方案的企業標準進行全面分析後,IronOCR 在效率、透明度和快速部署優先的現代組織中展現出明顯的優勢。 優越的開發者體驗、可預測的成本和專業功能的結合,使IronOCR成為 OCR 實施的最佳選擇。
對企業架構師和決策者的建議:
-
為新實施選擇 IronOCR
- 以最少的配置實現更快的價值獲取
- 透明的定價支持精確的預算編制
- 完整功能消除了額外的依賴性
-
在可行時從 PDFTron 遷移
- 簡化操作複雜性
- 降低總擁有成本
- 提升開發者生產力
-
通過概念驗證進行驗證
- 使用具體的文件型別測試 IronOCR
- 衡量準確性和效能指標
- 根據開發時間節省計算投資回報率
- 計劃長期成功
- 為增長選擇適當的授權級別
- 從一開始就實施最佳實踐
- 使用IronOCR的支持資源
這些證據壓倒性的支持IronOCR作為首選的企業 OCR 解決方案。 其有效的功能、透明的定價和簡化的部署結合起來,滿足了注重安全、合規的組織的核心需求。 雖然 PDFTron 在某些傳統場景中仍然有效,但新實施將從IronOCR的現代架構和開發者友好的方法中獲益良多。
使用IronOCR的免費試用開始您的評估,親身體驗效率提升。 對於準備更新其文件處理工作流程的組織來說,IronOCR 提供了數位轉型倡議所需的可靠基礎。
常見問題
什麼是光學字元識別 (OCR) 及其重要性?
光學字元識別(OCR)是一種將紙質文件或圖像轉換為可讀文字的技術。它對法律、商業和學術領域的應用至關重要,使得掃描文件和PDF可轉換回其原始文字格式。
我如何將OCR功能整合到C#應用程式?
您可以使用IronOCR將OCR功能整合到C#應用程式中,其可以無縫整合到.NET應用程式中,並支持多語言和多種條碼格式。
IronOCR的安裝步驟是什麼?
IronOCR可以通過Visual Studio的NuGet Package Manager安裝。您也可以使用Visual Studio命令行,直接從NuGet網站下載,或從IronOCR網站獲取。
PDFTron OCR與IronOCR的主要區別是什麼?
雖然PDFTron OCR需要單獨的附加模組且在文件格式上具有多樣性,但IronOCR提供了與.NET的更好整合,支持更多語言,並提供以使用便利性為重點的具競爭力價格。
IronOCR如何處理低質量的掃描?
IronOCR專為修正低質量掃描而設計,即使原始圖像質量不高,也能提供準確的文字識別和結構化資料輸出。
IronOCR的語言支持能力是什麼?
IronOCR支持125種語言,是全球需要OCR功能的應用程式的多功能選擇。
IronOCR可以用於條碼識別嗎?
可以,IronOCR支持從PDF和圖像中讀取文字、QR碼和條碼,增強了其在多種應用程式中的實用性。
OCR技術的一些常見用例是什麼?
OCR技術常用於轉換掃描的法律文件、自動化資料輸入、使PDF可搜尋以及通過將文字轉換為音訊來幫助視力受損的使用者。
IronOCR與PDFTron OCR相較之下,價格如何?
IronOCR提供簡單明晰的永久授權,並可根據不同使用者需求提供多種選擇,而PDFTron OCR的定價是根據特定應用需求定製的,通常導致更高的成本。
使用IronOCR將圖像轉換為文字的過程是什麼?
通過IronOCR,您可以在.NET應用程式中利用其OCR功能將圖像轉換為文字,並利用它對多種圖像格式和語言的支持。

