We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

OCRProcessor.PerformOCR page selection

How to select which pages to perform OCR? I have 100 pages PDF but want to perform OCR on page range 1-50.

var loadedDocument = new PdfLoadedDocument(@"c:\test.pdf")
 processor.PerformOCR(loadedDocument, Path.Combine(AppConstants.ConverterBinPath, @"Tesseract\Tessdata"));

1 Reply

SL Sowmiya Loganathan Syncfusion Team November 26, 2019 10:14 AM UTC

Hi Marek, 

Thank you for contacting Syncfusion support. 

We can able to perform OCR on particular range of page using PerformOCR overload. Please refer the below code snippet for more details, 

//Load a PDF document 
PdfLoadedDocument lDoc = new PdfLoadedDocument("Input.pdf"); 
 
//Set OCR language to process 
processor.Settings.Language = Languages.English;                
 
//Process OCR by providing the PDF document, start page, end page and Tesseract data 
string str = processor.PerformOCR(lDoc, 0, 49,  @"Tessdata");  

Please refer the below documentation link for more details about the overloads in PerformOCR method,  

Please try the above solution in your end and let us know the result.  

Regards, 
Sowmiya Loganathan 


Loader.
Live Chat Icon For mobile
Up arrow icon