Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active January 17, 2022 21:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aspose-com-gists/8353bc5cdd9cccf7d506abad0ea7fad7 to your computer and use it in GitHub Desktop.
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
// 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