Skip to content

Instantly share code, notes, and snippets.

@aspose-com-gists
Last active June 21, 2021 19:24
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/3354720c8cd171a4934e0d7a9d0f6ce1 to your computer and use it in GitHub Desktop.
Save aspose-com-gists/3354720c8cd171a4934e0d7a9d0f6ce1 to your computer and use it in GitHub Desktop.
Convert Image to Word Document (DOCX) with OCR using C# | PNG JPG BMP TIFF
// Initialize an instance of AsposeOcr
AsposeOcr api = new AsposeOcr();
// Recognize image with OCR
RecognitionResult result = api.RecognizeImage("sample.png", new RecognitionSettings { });
// Save the result in your Word Document format with spellcheck
result.Save("Sample_SpellCheck.docx", SaveFormat.Docx, true, SpellChecker.SpellCheckLanguage.Eng);
// Initialize an instance of AsposeOcr
AsposeOcr api = new AsposeOcr();
// Recognize input image
RecognitionResult result = api.RecognizeImage("sample.png", new RecognitionSettings { });
// Save the result in Microsoft Word Document format
result.Save("sample.docx", SaveFormat.Docx);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment