var CloudmersiveOcrApiClient = require('cloudmersive-ocr-api-client');
var defaultClient = CloudmersiveOcrApiClient.ApiClient.instance;

// Configure API key authorization: Apikey
var Apikey = defaultClient.authentications['Apikey'];
Apikey.apiKey = 'YOUR API KEY';



var apiInstance = new CloudmersiveOcrApiClient.PreprocessingApi();

var imageFile = Buffer.from(fs.readFileSync("C:\\temp\\inputfile").buffer); // File | Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.


var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.preprocessingGetPageAngle(imageFile, callback);
from __future__ import print_function
import time
import cloudmersive_ocr_api_client
from cloudmersive_ocr_api_client.rest import ApiException
from pprint import pprint

# Configure API key authorization: Apikey
configuration = cloudmersive_ocr_api_client.Configuration()
configuration.api_key['Apikey'] = 'YOUR_API_KEY'



# create an instance of the API class
api_instance = cloudmersive_ocr_api_client.PreprocessingApi(cloudmersive_ocr_api_client.ApiClient(configuration))
image_file = '/path/to/file' # file | Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.

try:
    # Get the angle of the page / document / receipt
    api_response = api_instance.preprocessing_get_page_angle(image_file)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling PreprocessingApi->preprocessing_get_page_angle: %s\n" % e)
using System;
using System.Diagnostics;
using Cloudmersive.APIClient.NET.OCR.Api;
using Cloudmersive.APIClient.NET.OCR.Client;
using Cloudmersive.APIClient.NET.OCR.Model;

namespace Example
{
    public class PreprocessingGetPageAngleExample
    {
        public void main()
        {
            // Configure API key authorization: Apikey
            Configuration.Default.AddApiKey("Apikey", "YOUR_API_KEY");
            
            

            var apiInstance = new PreprocessingApi();
            var imageFile = new System.IO.FileStream("C:\\temp\\inputfile", System.IO.FileMode.Open); // System.IO.Stream | Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.

            try
            {
                // Get the angle of the page / document / receipt
                GetPageAngleResult result = apiInstance.PreprocessingGetPageAngle(imageFile);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling PreprocessingApi.PreprocessingGetPageAngle: " + e.Message );
            }
        }
    }
}
// Import classes:
//import com.cloudmersive.client.invoker.ApiClient;
//import com.cloudmersive.client.invoker.ApiException;
//import com.cloudmersive.client.invoker.Configuration;
//import com.cloudmersive.client.invoker.auth.*;
//import com.cloudmersive.client.PreprocessingApi;

ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure API key authorization: Apikey
ApiKeyAuth Apikey = (ApiKeyAuth) defaultClient.getAuthentication("Apikey");
Apikey.setApiKey("YOUR API KEY");
// Uncomment the following line to set a prefix for the API key, e.g. "Token" (defaults to null)
//Apikey.setApiKeyPrefix("Token");

PreprocessingApi apiInstance = new PreprocessingApi();
File imageFile = new File("/path/to/file"); // File | Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.
try {
    GetPageAngleResult result = apiInstance.preprocessingGetPageAngle(imageFile);
    System.out.println(result);
} catch (ApiException e) {
    System.err.println("Exception when calling PreprocessingApi#preprocessingGetPageAngle");
    e.printStackTrace();
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');

// Configure API key authorization: Apikey
$config = Swagger\Client\Configuration::getDefaultConfiguration()->setApiKey('Apikey', 'YOUR_API_KEY');



$apiInstance = new Swagger\Client\Api\PreprocessingApi(
    
    
    new GuzzleHttp\Client(),
    $config
);
$image_file = "/path/to/file"; // \SplFileObject | Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.

try {
    $result = $apiInstance->preprocessingGetPageAngle($image_file);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling PreprocessingApi->preprocessingGetPageAngle: ', $e->getMessage(), PHP_EOL;
}
?>
CMDefaultConfiguration *apiConfig = [CMDefaultConfiguration sharedConfig];

// Configure API key authorization: (authentication scheme: Apikey)
[apiConfig setApiKey:@"YOUR_API_KEY" forApiKeyIdentifier:@"Apikey"];




NSURL* imageFile = [NSURL fileURLWithPath:@"/path/to/file"]; // Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.

CMPreprocessingApi*apiInstance = [[CMPreprocessingApi alloc] init];

// Get the angle of the page / document / receipt
[apiInstance preprocessingGetPageAngleWithImageFile:imageFile
          completionHandler: ^(CMGetPageAngleResult* output, NSError* error) {
                        if (output) {
                            NSLog(@"%@", output);
                        }
                        if (error) {
                            NSLog(@"Error calling CMPreprocessingApi->preprocessingGetPageAngle: %@", error);
                        }
                    }];
# load the gem
require 'cloudmersive-ocr-api-client'
# setup authorization
CloudmersiveOcrApiClient.configure do |config|
  # Configure API key authorization: Apikey
  config.api_key['Apikey'] = 'YOUR API KEY'
  # Uncomment the following line to set a prefix for the API key, e.g. 'Bearer' (defaults to nil)
  #config.api_key_prefix['Apikey'] = 'Bearer'
end

api_instance = CloudmersiveOcrApiClient::PreprocessingApi.new

image_file = File.new("/path/to/file") # File | Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.


begin
  #Get the angle of the page / document / receipt
  result = api_instance.preprocessing_get_page_angle(image_file)
  p result
rescue CloudmersiveOcrApiClient::ApiError => e
  puts "Exception when calling PreprocessingApi->preprocessing_get_page_angle: #{e}"
end