Invoeren naar tekst voor .NET

Inleiding tot factuur in tekst voor .NET

Invoeren naar tekst voor .NET is een plug-in dat ontwikkelaars in staat stelt tekst uit facturen te extraheren en ze te converteren in bewerkbare formaten. deze gids zal je door de beschikbare functies, hoe te beginnen, en geeft voorbeelden van code in C#.

Ondersteunde bestandsformaat

De plugin ondersteunt de extractie van tekst uit verschillende afbeeldings- en documentbestandformaat, waaronder:

  • JPEG
  • PNG
  • GIF
  • BMP
  • TIFF

Tekst uit de facturen halen

Om tekst uit een factuur te extraheren, kunt u het volgende code voorbeeld gebruiken:

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 verwijzing

For more information on the available classes, methods, and properties, please refer to the API referentiedocumentatie .

 Nederlands