AsposeOcrCloud-OcrApi

 view release on metacpan or  search on metacpan

lib/AsposeOcrCloud/ApiClient.pm  view on Meta::CPAN

    if (@header == 0 || (@header == 1 && $header[0] eq '')) {
        return undef;
    } elsif (grep(/^application\/json$/i, @header)) {
        return 'application/json';
    } else {
        return join(',', @header);
    }
  
}

# return the content type based on an array of content-type provided
# @param [Array] content_type_array Array fo content-type
# @return String Content-Type (e.g. application/json)
sub select_header_content_type
{
    my ($self, @header) = @_;
  
    if (@header == 0 || (@header == 1 && $header[0] eq '')) {
        return 'application/json'; # default to application/json
    } elsif (grep(/^application\/json$/i, @header)) {
        return 'application/json';
    } else {

lib/AsposeOcrCloud/OcrApi.pm  view on Meta::CPAN

                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    if (!$response) {
        return;
    }

	if($AsposeOcrCloud::Configuration::debug){
		print "\nResponse Content: ".$response->content;
	}    
	
	my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'OCRResponse', $response->header('content-type'));
    return $_response_object;
    
}
#
# GetRecognizeDocument
#
# Recognize image text, language and text region can be selected, default dictionaries can be used for correction.
# 
# @param String $name Name of the file to recognize. (required)
# @param String $language Language of the document. (optional)

lib/AsposeOcrCloud/OcrApi.pm  view on Meta::CPAN

                                           $query_params, $form_params,
                                           $header_params, $_body_data, $auth_settings);
    if (!$response) {
        return;
    }

	if($AsposeOcrCloud::Configuration::debug){
		print "\nResponse Content: ".$response->content;
	}    
	
	my $_response_object = $self->{api_client}->pre_deserialize($response->content, 'OCRResponse', $response->header('content-type'));
    return $_response_object;
    
}


1;



( run in 1.674 second using v1.01-cache-2.11-cpan-524268b4103 )