IRONSOFTWAREHOME

附加 OCR 语言包

Curtis Chau
Curtis Chau
Updated: 2026年4月22日

IronOCR 支持 125 种国际语言,但 IronOCR 默认只安装了英语

可以通过 NuGet 或 DLL 文件轻松地将其他语言包添加到您的 C#、VB 或ASP.NET项目中,下载这些 DLL 文件并将其添加为项目引用。

代码示例

国际语言示例

PM > Install-Package IronOcr.Languages.ChineseSimplified

using IronOcr;

var ocr = new IronTesseract();
// Set the OCR to use Chinese Simplified
ocr.Language = OcrLanguage.ChineseSimplified;

using (var input = new OcrInput())
{
    // Add an image to be processed
    input.AddImage("img/chinese.gif");

    // Optional: Enhance the input by deskewing or denoising the image
    // input.Deskew();
    // input.DeNoise();

    // Process the image and retrieve the result
    var result = ocr.Read(input);

    // Store the recognized text in a string
    string testResult = result.Text;

    // Save the recognized text to a file since the console might not display Unicode characters properly
    result.SaveAsTextFile("chinese.txt");
}

竖式书写语言示例

专为竖写语言设计的词典。 使用韩语和日语 OCR 语言的"垂直"变体。

using IronOcr;

var ocr = new IronTesseract();
// Set the OCR to use Japanese Vertical language
ocr.Language = OcrLanguage.JapaneseVertical;

using (var input = new OcrInput(@"images\image.png"))
{
    // Process the image and get the OCR result
    var result = ocr.Read(input);
    // Output the recognized text to the console
    Console.WriteLine(result.Text);
}

自定义语言示例

适用于您下载或自行训练的任何 Tesseract .traineddata 语言文件。

using IronOcr;

var ocr = new IronTesseract();

// Use a custom Tesseract language file
ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");

using (var input = new OcrInput(@"images\image.png"))
{
    // Process the image and get the OCR result
    var result = ocr.Read(input);
    // Output the recognized text to the console
    Console.WriteLine(result.Text);
}

多语言示例

同时学习多种语言。

PM > Install-Package IronOcr.Languages.Arabic

using IronOcr;

var ocr = new IronTesseract();

// Set the primary language to English
ocr.Language = OcrLanguage.English;
// Add Arabic as a secondary language
ocr.AddSecondaryLanguage(OcrLanguage.Arabic);
// Add any number of languages

using (var input = new OcrInput(@"images\multi-lang.pdf"))
{
    // Process the PDF and get the OCR result
    var result = ocr.Read(input);
    // Output the recognized text to the console
    Console.WriteLine(result.Text);
}

更快的语言示例

专为快速使用而设计的词典。 使用任何 OcrLanguage 的"快速"版本。

using IronOcr;

var ocr = new IronTesseract();
// Set the OCR to use the fast variant of English
ocr.Language = OcrLanguage.EnglishFast;

using (var input = new OcrInput(@"images\image.png"))
{
    // Process the image and get the OCR result
    var result = ocr.Read(input);
    // Output the recognized text to the console
    Console.WriteLine(result.Text);
}

更高精度的详细语言示例

词典经过优化,准确性更高,但检索速度较慢。 使用任何 OcrLanguage 的"最佳"版本。

PM > Install-Package IronOcr.Languages.French

using IronOcr;

var ocr = new IronTesseract();
// Set the OCR to use the best variant of French
ocr.Language = OcrLanguage.FrenchBest;

using (var input = new OcrInput(@"images\image.png"))
{
    // Process the image and get the OCR result
    var result = ocr.Read(input);
    // Output the recognized text to the console
    Console.WriteLine(result.Text);
}

如何安装 OCR 语言包

其他 OCR 语言包可供下载,详情请见下方。 任何一个

  • 安装 NuGet 包。 在NuGet中搜索IronOCR语言
  • 或下载"ocrdata"文件并将其添加到您的.NET项目中的任何文件夹。设置CopyToOutputDirectory = CopyIfNewer

下载 OCR 语言包

帮助

如果您要阅读的语言不在上面的列表中,请 联系我们

如有需要,我们还提供其他多种语言版本。

优先考虑 IronOCR 许可证持有者的生产资源,因此请考虑 为 IronOCR 申请许可证,以访问您所需的语言包。

Curtis Chau
技术作家

Curtis Chau 拥有卡尔顿大学的计算机科学学士学位,专注于前端开发,精通 Node.js、TypeScript、JavaScript 和 React。他热衷于打造直观且美观的用户界面,喜欢使用现代框架并创建结构良好、视觉吸引力强的手册。

...
阅读更多

准备开始了吗?

Nuget Downloads 6,236,385版本:2026.9刚刚发布

免费获取

30天试用密钥 即刻获取。

bullet_checked无需信用卡或创建账户
bullet_test在生产环境中测试
且无水印
bullet_calendar30天完全
功能性产品
bullet_support试用期间提供
24/5技术支持
立即获取您的免费30 天试用密钥
无需信用卡或创建账户
C# 用于 PDF 的 NuGet 库
通过 NuGet 安装

版本: 2026.9

PM > Install-Package IronOcr
nuget.org/packages/IronOcr/
  1. 在解决方案资源管理器中,右键点击引用,管理 NuGet 包
  2. 选择浏览并搜索"IronOCR"
  3. 选择包并安装
C# PDF DLL
下载 DLL

版本: 2026.9

或在这里下载Windows安装程序。

  1. 下载并解压IronOCR到你的解决方案目录中的~/Libs位置
  2. 在Visual Studio解决方案资源管理器中,右键点击引用。选择浏览,“IronOCR.dll”

许可证售价$999

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 天试用密钥
无需信用卡或创建账户