OCRPro.ServerSide.Response

Once the OCR service finishes processing the documents, it sends a response to the client. The response has the following structure:

//OCR Response Body
{
  "Request": {
    inputFile:
      [
        ...
      ],
    settings:
      {
        ...
      },
    outputFile: ...
  }
  ocrTotalCount: 300000,
  alreadyOCRCount: 80,
  code: 0,
  message: "Recognize succeeded.",
  errorList: 
  [
    {
      "input": "d:\\input\\1.tif",
      "message": "Image file format error.",
      "page": "1"
    },
    {
      "input": "d:\\input\\2.pdf",
      "message": "",
      "page": "1"
    },
    {
      "input": "d:\\input\\3.pdf",
      "message": "",
      "page": "1"
    }
  ]
  resultFile: "base64 encoded",
  resultDetail:
  [
    [//page 0
      {//letter 0
        "letter": "Aa",
        "boundary": [0,0,18,18]
      },
      {//letter 1
        ...
      },
      ...
    ],
    [//page 1
      ...
    ],
    ...    
  ]  
}  

SpaceHoler

inputFile

This is an array of strings which are absolute paths of the files uploaded and saved on the server. The supported formats are BMP, JPG, TIF, PDF, PNG, JBIG2, JPEG2000, PCX, etc. Check out OCRPro.ServerSide.Request for more info.

SpaceHoler

settings

Settings for the OCR. Check out OCRPro.ServerSide.Request for more info.

SpaceHoler

outputFile

Specifies where the output file will be placed. If specified, all OCR'd files will be merged as one file and saved at the specified location. Otherwise, the result will be returned in the HTTP Response. Check out OCRPro.ServerSide.Request for more info.

SpaceHoler

ocrTotalCount

Returns how many pages are allowed to be OCR'd by the current license.

SpaceHoler

alreadyOCRCount

Returns how many pages have been OCR'd.

SpaceHoler

code

Returns the error code for the OCR. If it's not '0', check errorList for more details.

SpaceHoler

message

Returns the error message for the OCR.

SpaceHoler

errorList

Returns the detailed error messages for each of the files OCR'd.

SpaceHoler

resultFile

If the OCRPro.ServerSide.Request didn't specify an output file path, then this returns the result file encoded as a base64 string.

SpaceHoler

resultDetail

Returns detailed OCR result down to each found letter in JSON format. This is only valid when the recognition method is set to 'Page'.