Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active March 16, 2022 08:17
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/17af428e962811d0b8aa74312b955115 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/17af428e962811d0b8aa74312b955115 to your computer and use it in GitHub Desktop.
Create Scanned PDF to Excel Converter with OCR in C# .NET
// Scanned PDF file path
string path = "Scanned.pdf";
// Initialize AsposeOcr calss object
AsposeOcr api = new AsposeOcr();
// Specify the settings for recognizing PDF file
DocumentRecognitionSettings settings = new DocumentRecognitionSettings();
settings.StartPage = 0;
settings.PagesNumber = 1;
// Recognize pages from scanned PDF file
List<RecognitionResult> res = api.RecognizePdf(path , settings);
// Save the output result as an Excel file in XLSX format
AsposeOcr.SaveMultipageDocument("output.xlsx", SaveFormat.Xlsx, res);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment