According to the documentation, the Azure OCR engine returns bounding box coordinates w.r.t. the top left corner of the page, in clockwise order, starting with the upper left corner. For horizontal text, this is definitely true. However, sometimes a document contains both horizontal and vertical text. This is when things go wrong: the vertical text is returned with bounding box coordinates are returned in a different order, such as in counter clockwise order starting from the bottom left corner or clock wise order starting with the bottom left corner. I assume that the page is rotated inside the OCR engine to deal with different orientations, but then the resulting bounding boxes are not rotated back to conform to the page orientation, resulting in bbox coordinates wrt different page orientations. In the attachment you can find an example that gives rise to this issue, more specifically, line 37 in the output has badly oriented bounding boxes.