Extracting text from receipts

Contents
[ ]

Almost all organizations offer their employees to reimburse travel expenses, network fees, and other payments confirmed by receipts. However, digitizing receipts is time consuming and lead to human error.

Aspose.OCR offers a special recognition algorithm that extracts text from scanned receipts, which can then be automatically sent to corporate platforms for approval and reimbursement.

To extract text from a receipt, use RecognizeReceipt method of AsposeOCR class.

This method allows you to customize recognition accuracy, performance, and other settings.

The method takes OcrInput object and returns a list of recognition results containing the identity data.

AsposeOCR api = new AsposeOCR();
// Add images to the recognition batch
OcrInput input  = new OcrInput(InputType.SingleImage);
input.add(os.path.join(self.dataDir, "receipt1.png"));
input.add(os.path.join(self.dataDir, "receipt2.png"));
// Recognition settings
ReceiptRecognitionSettings recognitionSettings = new ReceiptRecognitionSettings();
recognitionSettings.setLanguage(Language.Ukr);
// Recognize receipts
ArrayList<RecognitionResult> results = api.RecognizeReceipt(input, recognitionSettings);
results.forEach((result) -> {
	System.out.println(result.recognition_text);
});