Inštalácia textu pre .NET
Úvod do faktúry do textu pre .NET
Invoice to Text for .NET je plugin, ktorý umožňuje vývojárom extrahovať text z faktúr a premeniť ich na editovateľné formáty.Tento sprievodca vás prechádza dostupnými funkciami, ako začať a poskytuje príklady kódu v C#.
Podporované formáty súborov
Plugin podporuje extrakciu textu z rôznych formátov obrázkov a dokumentov, vrátane:
- JPEG
- PNG
- GIF
- BMP
- TIFF
Odstránenie textu z faktúr
Ak chcete extrahovať text z faktúry, môžete použiť nasledujúci príklad kódu:
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);
Odkaz na API
For more information on the available classes, methods, and properties, please refer to the API referenčná dokumentácia .