You can read more details at: Convert Scanned PDF to Searchable PDF with OCR in C#
Last active
January 17, 2022 21:09
-
-
Save aspose-com-gists/8353bc5cdd9cccf7d506abad0ea7fad7 to your computer and use it in GitHub Desktop.
How to Convert Scanned PDF to Searchable PDF in C# .NET
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 | |
AsposeOcr api = new AsposeOcr(); | |
// Recognize images from PDF | |
List<RecognitionResult> res = api.RecognizePdf(fullPath, new DocumentRecognitionSettings | |
{ | |
StartPage = 0, | |
PagesNumber = 1 | |
}); | |
// Save result as Searchable PDF | |
AsposeOcr.SaveMultipageDocument("output.pdf", SaveFormat.Pdf, res); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment