Created
January 17, 2022 21:05
-
-
Save aspose-com-gists/f0cfe4eef8e1f4dfee3b9a8c2b825218 to your computer and use it in GitHub Desktop.
Create Scanned PDF to Excel Converter with OCR in Java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Scanned PDF file path | |
String fullPath = "scanned.pdf"; | |
// Initialize AsposeOcr class object | |
AsposeOCRPdf api = new AsposeOCRPdf(); | |
// Initialize DocumentRecognitionSettings class object | |
DocumentRecognitionSettings settings = new DocumentRecognitionSettings(0,1); | |
// Recognize images from PDF | |
ArrayList<RecognitionResult> res = api.RecognizePdf(fullPath, settings); | |
// Save result as Excel XLSX file | |
AsposeOCR.SaveMultipageDocument("output.xlsx", Format.Xlsx, res); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment