Jeton d'annulation
using IronOcr;
using System.Threading;

// Opens a Large PDF which may need to be cancelled early
IronTesseract ocrTesseract = new IronTesseract() { Language = OcrLanguage.English };

using var ocrInput = new OcrInput();
ocrInput.LoadPdf("large-report.pdf");

// Starts a read on the PDF using IronOCR
OcrReadTask ocrRead = ocrTesseract.ReadAsync(ocrInput);

Thread.Sleep(1000); // Time passes...

// Cancellation Example:
ocrRead.Cancel();
ocrRead.Wait();
NuGet Download
PM > Install-Package IronOcr
Jeton d'annulation

Jeton d'annulation

La fonctionnalité permet aux utilisateurs de suspendre le thread actuel pendant une période spécifiée en millisecondes.

Cela aide à lire de grands fichiers d'entrée dans le cas où il y aurait un blocage pendant que le programme ou l'application est en cours d'exécution.

Explorez les opérations OCR asynchrones avec IronOCR.
Voir sur GitHub

Prêt à commencer?

Nuget Downloads 6,357,159Version :2026.11vient de sortir