Processing result formats
Contents
[
Hide
]
Aspose.OCR Cloud can return results in the most popular document and data exchange formats. The desired format is specified in request settings:
Format | REST API setting | Applies to |
---|---|---|
Plain text | "resultType": "Text" "resultTypeTable": "Text" "resultType": "TextAndPdf" "resultType": "TextAndHocr" "resultType": "TextAndPdfAndHocr" |
Image recognition PDF recognition Receipt recognition Table recognition Regions recognition |
"resultType": "Pdf" "resultType": "TextAndPdf" "resultType": "PdfAndHocr" "resultType": "TextAndPdfAndHocr" |
Image recognition PDF recognition Receipt recognition Regions recognition |
|
hOCR | "resultType": "Hocr" "resultType": "TextAndHocr" "resultType": "PdfAndHocr" "resultType": "TextAndPdfAndHocr" |
Image recognition PDF recognition Receipt recognition Regions recognition |
JSON | "resultType": "JSON" |
Image recognition PDF recognition Receipt recognition Table recognition |
Excel | "resultType": "Excel" "resultTypeTable": "CsvAndExcel" |
Table recognition |
CSV | "resultType": "Csv" "resultTypeTable": "CsvAndExcel" |
Table recognition |
WAV | "resultType": "Wav" |
Text to speech conversion |
PNG | "resultType": "ImagePNG" |
Image preprocessing |
Returning recognition result as JSON
When the recognition result is returned as JSON, the resulting file will contain the array of all content block found in the image and the recognized text found in the block:
- The coordinates of the top left and bottom right corners of the content block.
- The recognized text (plain text string).
Important considerations
- You can get more than one result type from a single request. Use combined formats, such as
TextAndPdf
,TextAndHocr
,PdfAndHocr
, orTextAndPdfAndHocr
. - When the recognition result is returned as PDF, the resulting PDF document will contain the preprocessed image in the background and an invisible text layer on top of it. This text layer can be searched, indexed, selected, and copied.
- Almost all results (including plain text) are returned as Base64 encoded strings. You must decode them to display on the screen or save to a file.