.NET のためのテキストへの請求書

.NET のためのテキストへの請求書の導入

Invoice to Text for .NET is a plugin that allows developers to extract text from invoices and convert them into editable formats. このガイドは、利用可能な機能、どのようにスタートするか、C#でコードの例を提供します。

サポートされているファイル形式

プラグインは、以下を含む、さまざまな画像およびドキュメントファイル形式からテキストの抽出をサポートします。

  • JPEG
  • PNG
  • GIF
  • BMP
  • TIFF

請求書からテキストを抽出

請求書からテキストを抽出するには、以下のコード例を使用することができます。

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 参照

利用可能なクラス、方法、および特性についての詳細については、参照してください。 API 参考文書 .

 日本語