.NET用のインボイスからテキストへの変換

.NET用のインボイスからテキストへの変換の紹介

.NET用のインボイスからテキストへの変換は、開発者がインボイスからテキストを抽出し、編集可能な形式に変換できるプラグインです。このガイドでは、利用可能な機能、開始方法、およびC#のコード例について説明します。

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

プラグインは、JPEG、PNG、GIF、BMP、TIFFなど、さまざまな画像およびドキュメントファイル形式からテキストを抽出することをサポートしています。

インボイスからのテキスト抽出

インボイスからテキストを抽出するには、以下のコード例を使用できます。

Aspose.OCR.AsposeOcr recognitionEngine = new Aspose.OCR.AsposeOcr();
// 画像をOcrInputオブジェクトに追加
Aspose.OCR.OcrInput input = new Aspose.OCR.OcrInput(Aspose.OCR.InputType.SingleImage);
input.Add("source1.png");
input.Add("source2.jpg");
// 認識言語を設定
Aspose.OCR.InvoiceRecognitionSettings recognitionSettings = new Aspose.OCR.InvoiceRecognitionSettings();
recognitionSettings.Language = Aspose.OCR.Language.Latin;
// 画像認識
List<Aspose.OCR.RecognitionResult> results = recognitionEngine.RecognizeInvoice(input, recognitionSettings);
foreach(Aspose.OCR.RecognitionResult result in results)
{
    Console.WriteLine(result.RecognitionText);
}
// ファイルとして保存
results[0].Save("result.txt", Aspose.OCR.SaveFormat.Text);
// または
Aspose.OCR.AsposeOcr.SaveMultipageDocument("result.pdf", Aspose.OCR.SaveFormat.Pdf, results);

APIリファレンス

利用可能なクラス、メソッド、およびプロパティの詳細については、APIリファレンスドキュメントを参照してください。

 日本語