You can read all the details at: Convert Scanned PDF to Searchable PDF with OCR in Java
Last active
January 17, 2022 21:11
-
-
Save aspose-com-gists/c3de3417fcf8e73bdd6dd0c404bd90cb to your computer and use it in GitHub Desktop.
Convert Scanned PDF to Searchable PDF 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 multipage PDF Path | |
String fullPath = "multi_page.pdf"; | |
// Initialize AsposeOcr class object | |
AsposeOCRPdf api = new AsposeOCRPdf(); | |
DocumentRecognitionSettings settings = new DocumentRecognitionSettings(0,1); | |
// Recognize images from PDF | |
ArrayList<RecognitionResult> res = api.RecognizePdf(fullPath, settings); | |
// Save result as Searchable PDF | |
AsposeOCR.SaveMultipageDocument("output.pdf", Format.Pdf, res); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment