Abort Token
The feature allows the users to suspend the current thread for a specified period in millisecond.
This helps with reading large input file in the case that there's a stuck while the program or application is running.
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();Install-Package IronOcr
The feature allows the users to suspend the current thread for a specified period in millisecond.
This helps with reading large input file in the case that there's a stuck while the program or application is running.