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. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

OCRProcessor.PerformOCR page selection

Thread ID:

Created:

Updated:

Platform:

Replies:

149403 Nov 25,2019 09:57 AM UTC Nov 26,2019 10:14 AM UTC WinForms 1
loading
Tags: PDF
Marek Opanas
Asked On November 25, 2019 09:57 AM UTC

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"));

Sowmiya Loganathan [Syncfusion]
Replied On 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 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon