def recognize_printed_text(detect_orientation, url, language:nil, custom_headers:nil)
      response = recognize_printed_text_async(detect_orientation, url, language:language, custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
def recognize_printed_text(detect_orientation, url, language:nil, custom_headers:nil)
      response = recognize_printed_text_async(detect_orientation, url, language:language, custom_headers:custom_headers).value!
      response.body unless response.nil?
    end
Optical Character Recognition (OCR) detects text in an image and extracts the
 recognized characters into a machine-usable character stream.
 Upon success, the OCR results will be returned.
 Upon failure, the error code together with an error message will be returned.
 The error code can be one of InvalidImageUrl, InvalidImageFormat,
 InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or
 InternalServerError.

 @param detect_orientation [Boolean] Whether detect the text orientation in
 the image. With detectOrientation=true the OCR service tries to detect the
 image orientation and correct it before further processing (e.g. if it's
 upside-down).
 @param url [String] Publicly reachable URL of an image.
 @param language [OcrLanguages] The BCP-47 language code of the text to be
 detected in the image. The default value is 'unk'. Possible values include:
 'unk', 'zh-Hans', 'zh-Hant', 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el',
 'hu', 'it', 'ja', 'ko', 'nb', 'pl', 'pt', 'ru', 'es', 'sv', 'tr', 'ar', 'ro',
 'sr-Cyrl', 'sr-Latn', 'sk'
 @param custom_headers [Hash{String => String}] A hash of custom headers that
 will be added to the HTTP request.

 @return [OcrResult] operation results.