using IronOcr;
int cancel_time = 1000;
// Opens a Large PDF which may need to be cancelled early
IronTesseract ocrTesseract = new IronTesseract() { Language = OcrLanguage.English };
var ocrInput = new OcrInput("large-report.pdf");
// Starts a read on the PDF using IronOCR with specified cancel time
OcrReadTask ocrRead = ocrTesseract.ReadAsync(ocrInput, cancel_time);
ocrRead.Wait();
Imports IronOcr
Private cancel_time As Integer = 1000
' Opens a Large PDF which may need to be cancelled early
Private ocrTesseract As New IronTesseract() With {.Language = OcrLanguage.English}
Private ocrInput = New OcrInput("large-report.pdf")
' Starts a read on the PDF using IronOCR with specified cancel time
Private ocrRead As OcrReadTask = ocrTesseract.ReadAsync(ocrInput, cancel_time)
ocrRead.Wait()