Sorry for the delay in response.
ABBYY Cloud OCR SDK has no direct method for returning the determined image orientation. But it is possible to extract the necessary data by analyzing the text coordinates from the XML export on your side. There are two available XML export formats in Cloud OCR SDK:
- xml – this format allows you to get text with its original image coordinates,
- xmlForCorrectedImage - this format allows you to get text with coordinates related to the corrected image (deskewed, rotated, etc.), not the original.
You can simultaneously export the recognized data into two these formats. To do this, specify the necessary formats, separated by commas, in the exportFormat parameter of the processImage method, for example: "xml,xmlForCorrectedImage". Then compare the coordinates from these files in order to calculate the rotation angle.