How to split a PDF document in Winrt
We can extract the rotated image text in a readable format in OCR by enabling the AutoDetectRotation property.
Please find the below code snippet to auto correct the image rotation.
C#:
using (OCRProcessor processor = new OCRProcessor(@"..\..\Tesseract binaries\")) { // Load the PDF document PdfLoadedDocument ldoc = new PdfLoadedDocument("..\..\Input.pdf"); // Language to process the OCR processor.Settings.Language = Languages.English; // Enable to AutoDetectRotation processor.Settings.AutoDetectRotation = true; // Process OCR by providing loaded PDF document, Data dictionary and language String str = processor.PerformOCR(ldoc, @"..\..\Tessdata\"); // Save the PDF document. ldoc.Save("Output.pdf"); ldoc.Close(true); }
The rotated image text can be readable, only if the osd.tranineddata file must be present in the Tessdata folder. We have attached osd.traineddata file in the below link.
https://www.syncfusion.com/downloads/support/directtrac/156562/ze/osd-425036592
Note:
Starting with v16.2.0.x, if you reference Syncfusion® assemblies from a trial setup or from the NuGet feed, include a license key in your projects. Refer to the link to learn about generating and registering the Syncfusion® license key in your application to use the components without a trial message.
Conclusion
I hope you enjoyed learning about How to split a PDF document in Winrt.
You can refer to our PDF feature tour page to learn about its other groundbreaking feature representations. You can also explore our documentation to understand how to create and manipulate data.
For current customers, you can check out our components from the License and Downloads page. If you are new to Syncfusion®, you can try our 30-day free trial to check out our other controls.
If you have any queries or require clarifications, please let us know in the comments section below. You can also contact us through our support forums or feedback portal. We are always happy to assist you!