text: /**
   * ocrapi
   * The powerful Optical Character Recognition (OCR) APIs let you convert scanned images of pages into recognized text.
   *
   * OpenAPI spec version: v1
   *
   * NOTE: This class is auto generated by the swagger code generator program.
   * https://github.com/swagger-api/swagger-codegen.git
   *
   * Swagger Codegen version: unset
   *
   * Do not edit the class manually.
   *
   */
  
  (function(root, factory) {
    if (typeof define === 'function' && define.amd) {
      // AMD. Register as an anonymous module.
      define(['ApiClient'], factory);
    } else if (typeof module === 'object' && module.exports) {
      // CommonJS-like environments that support module.exports, like Node.
      module.exports = factory(require('../ApiClient'));
    } else {
      // Browser globals (root is window)
      if (!root.CloudmersiveOcrApiClient) {
        root.CloudmersiveOcrApiClient = {};
      }
      root.CloudmersiveOcrApiClient.PreprocessingApi = factory(root.CloudmersiveOcrApiClient.ApiClient);
    }
  }(this, function(ApiClient) {
    'use strict';
  
    /**
     * Preprocessing service.
     * @module api/PreprocessingApi
     * @version 1.1.3
     */
  
    /**
     * Constructs a new PreprocessingApi. 
     * @alias module:api/PreprocessingApi
     * @class
     * @param {module:ApiClient} [apiClient] Optional API client implementation to use,
     * default to {@link module:ApiClient#instance} if unspecified.
     */
    var exports = function(apiClient) {
      this.apiClient = apiClient || ApiClient.instance;
  
  
      /**
       * Callback function to receive the result of the preprocessingUnrotate operation.
       * @callback module:api/PreprocessingApi~preprocessingUnrotateCallback
       * @param {String} error Error message, if any.
       * @param {Object} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Detect and unrotate a document image
       * Detect and unrotate an image of a document (e.g. that was scanned at an angle).  Great for document scanning applications; once unskewed, this image is perfect for converting to PDF using the Convert API or optical character recognition using the OCR API.
       * @param {File} imageFile Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.
       * @param {module:api/PreprocessingApi~preprocessingUnrotateCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Object}
       */
      this.preprocessingUnrotate = function(imageFile, callback) {
        var postBody = null;
  
        // verify the required parameter 'imageFile' is set
        if (imageFile === undefined || imageFile === null) {
          throw new Error("Missing the required parameter 'imageFile' when calling preprocessingUnrotate");
        }
  
  
        var pathParams = {
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
          'imageFile': imageFile
        };
  
        var authNames = ['Apikey'];
        var contentTypes = ['multipart/form-data'];
        var accepts = ['application/json', 'text/json', 'application/xml', 'text/xml'];
        var returnType = Object;
  
        return this.apiClient.callApi(
          '/ocr/preprocessing/image/unrotate', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
  
      /**
       * Callback function to receive the result of the preprocessingUnskew operation.
       * @callback module:api/PreprocessingApi~preprocessingUnskewCallback
       * @param {String} error Error message, if any.
       * @param {Object} data The data returned by the service call.
       * @param {String} response The complete HTTP response.
       */
  
      /**
       * Detect and unskew a photo of a document
       * Detect and unskew a photo of a document (e.g. taken on a cell phone) into a perfectly square image.  Great for document scanning applications; once unskewed, this image is perfect for converting to PDF using the Convert API or optical character recognition using the OCR API.
       * @param {File} imageFile Image file to perform OCR on.  Common file formats such as PNG, JPEG are supported.
       * @param {module:api/PreprocessingApi~preprocessingUnskewCallback} callback The callback function, accepting three arguments: error, data, response
       * data is of type: {@link Object}
       */
      this.preprocessingUnskew = function(imageFile, callback) {
        var postBody = null;
  
        // verify the required parameter 'imageFile' is set
        if (imageFile === undefined || imageFile === null) {
          throw new Error("Missing the required parameter 'imageFile' when calling preprocessingUnskew");
        }
  
  
        var pathParams = {
        };
        var queryParams = {
        };
        var collectionQueryParams = {
        };
        var headerParams = {
        };
        var formParams = {
          'imageFile': imageFile
        };
  
        var authNames = ['Apikey'];
        var contentTypes = ['multipart/form-data'];
        var accepts = ['application/json', 'text/json', 'application/xml', 'text/xml'];
        var returnType = Object;
  
        return this.apiClient.callApi(
          '/ocr/preprocessing/image/unskew', 'POST',
          pathParams, queryParams, collectionQueryParams, headerParams, formParams, postBody,
          authNames, contentTypes, accepts, returnType, callback
        );
      }
    };
  
    return exports;
  }));
  