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

OCR - does the engine autodetect rotation of images in the PDF?

I am trying to optimize OCR scanning using the library.

It seems that rotated images with text are not recognized or purely recognized.

How can I ensure that rotation of particular pages are identified and prerotated before the OCR engine scans the page?

Thanks in advance

1 Reply

SK Surya Kumar Syncfusion Team September 15, 2017 11:02 AM UTC

Hi Johannes, 
Thank you for using Syncfusion products. 
We do have support for auto detecting the rotated images in the PDF page and perform OCR,  please enable the “AutoDetectRotation” property in OCRProcessor settings. Please find the code snippet for the same below: 
            using (OCRProcessor processor = new OCRProcessor(@"../../TesseractBinaries/")) 
                //Load a PDF document 
                PdfLoadedDocument lDoc = new PdfLoadedDocument(DataPathBase + "RotatedOCR1.pdf"); 
                processor.Settings.Language = "eng"; 
                //Enabling AutoDetectRotation property 
                processor.Settings.AutoDetectRotation = true; 
                processor.PerformOCR(lDoc, @"../../Tessdata/"); 
                //Saving and closing the document 
                lDoc.Save(DataPathOutput + "Output1.pdf"); 
Also, please follow below instruction:  
“Tessdata” folder should contain the file “osd.traineddata” in order to get this feature working which can be downloaded from below link: 

We have created sample for the same which can be found in below link: 

Please let us know if you need any further information 

Surya Kumar 

Live Chat Icon For mobile
Up arrow icon