IRONSOFTWAREHOME
Lire une photo
using IronOcr;
using IronSoftware.Drawing;
using System;

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

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

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

// Index number refer to region order in the page
int number = result.TextRegions[0].PageNumber;

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

//Extract the co-ordinates of the first text region
Rectangle region = result.TextRegions[0].Region;

var output = $"Text in First Region: {textinregion}\n"
             + $"Text Region:\n"
             + $"Starting X: {region.X}\n"
             + $"Starting Y: {region.Y}\n"
             + $"Region Width: {region.Width}\n"
             + $"Region Height: {region.Height}\n"
             + $"Result Confidence: {result.Confidence}\n\n"
             + $"Full Scnned Photo Text: {result.Text}";

Console.WriteLine(output);
Imports IronOcr
Imports IronSoftware.Drawing
Imports System

' Instantiate OCR engine
Dim ocr As New IronTesseract()

Using inputPhoto As New OcrInput()
    inputPhoto.LoadImageFrame("ocr.tiff", 0)

    ' Read photo
    Dim result As OcrPhotoResult = ocr.ReadPhoto(inputPhoto)

    ' Index number refer to region order in the page
    Dim number As Integer = result.TextRegions(0).PageNumber

    ' Extract the text in the first region
    Dim textinregion As String = result.TextRegions(0).TextInRegion

    'Extract the co-ordinates of the first text region
    Dim region As Rectangle = result.TextRegions(0).Region

    Dim output As String = $"Text in First Region: {textinregion}" & vbCrLf &
                           $"Text Region:" & vbCrLf &
                           $"Starting X: {region.X}" & vbCrLf &
                           $"Starting Y: {region.Y}" & vbCrLf &
                           $"Region Width: {region.Width}" & vbCrLf &
                           $"Region Height: {region.Height}" & vbCrLf &
                           $"Result Confidence: {result.Confidence}" & vbCrLf & vbCrLf &
                           $"Full Scnned Photo Text: {result.Text}"

    Console.WriteLine(output)
End Using
NuGet Download
PM > Install-Package IronOcr
Lire une photo

Lire une photo

Voir sur GitHub

Prêt à commencer?

Nuget Downloads 6,279,416Version :2026.10vient de sortir

Key in blue circle

Obtenez votre clé d'essai de 30 jours instantanément.

Your trial license will be sent to your email address

Aucune restriction. 100 % débloqué. Pas de carte bancaire.

bullet_checkedAucune carte de crédit ou création de compte requiseAucune restriction. 100 % débloqué. Pas de carte bancaire.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronOCR
Réservez votre Démonstration en direct gratuite
Booking Badge

De confiance par des millions d'ingénieurs dans le monde entier

Logos des clients d'Iron Software
Obtenez Votre Consultation sans Engagement
Vos informations seront toujours gardées confidentielles.
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
De confiance par des millions d'ingénieurs dans le monde entier
Obtenez votre clé d'essai 30 jours gratuitement.
Aucune carte de crédit ou création de compte requise
Bibliothèque C# NuGet pour PDF
Installer avec NuGet

Version : 2026.10

PM > Install-Package IronOcr
nuget.org/packages/IronOcr/
  1. Dans l'explorateur de solutions, faites un clic droit sur Références, Gestion des packages NuGet
  2. Sélectionnez Parcourir et cherchez "IronOCR"
  3. Sélectionnez le package et installez
C# PDF DLL
Télécharger DLL

Version : 2026.10

ou téléchargez le programme d'installation Windows ici.

  1. Téléchargez et décompressez IronOCR à un emplacement tel que ~/Libs dans votre répertoire du projet
  2. Dans l'Explorateur de Solutions de Visual Studio, faites un clic droit sur Références. Sélectionnez Parcourir, "IronOCR.dll"

Licences à partir de $999