Invoice to Text for .NET
Introduction to Invoice to Text for .NET
Invoice to Text for .NET is a plugin that allows developers to extract text from invoices and convert them into editable formats. This guide will walk you through the available features, how to get started, and provide code examples in C#.
Supported File Formats
The plugin supports extraction of text from various image and document file formats, including:
- JPEG
- PNG
- GIF
- BMP
- TIFF
Extracting Text from Invoices
To extract text from an invoice, you can use the following code example:
Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// Add images to OcrInput object
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
input.Add("source1.png");
input.Add("source2.jpg");
// Set recognition language
Aspose.OCR.InvoiceRecognitionSettings recognitionSettings = new Aspose.OCR.InvoiceRecognitionSettings();
recognitionSettings.Language = Aspose.OCR.Language.Latin;
// Recognize image
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.RecognizeInvoice(input, recognitionSettings);
foreach(Aspose.OCR.RecognitionResult result in results)
{
Console.WriteLine(result.RecognitionText);
}
//save as a file
results[0].Save("result.txt", Aspose.OCR.SaveFormat.Text);
//or
Aspose.OCR.AsposeOcr.SaveMultipageDocument("result.pdf", Aspose.OCR.SaveFormat.Pdf, results);
API Reference
For more information on the available classes, methods, and properties, please refer to the API reference documentation.