I'm using the Cloud OCR SDK in an iOS application to scan business cards. I'd like to enable the sub-fields for things like first and last name or address components. This page: http://ocrsdk.com/documentation/apireference/processBusinessCard/ makes me think I can add the "writeExtendedCharacterInfo" parameter to the request and I'll get the extra fields. I also found the schema description file here: http://ocrsdk.com/schema/recognizedBusinessCard-1.0.xsd

Here's the code I'm using:

void(^failure)(NSError *) = ^(NSError *error){

void(^startSuccess)(NSDictionary *) = ^(NSDictionary *taskInfo) {

void(^activateSuccess)() = ^() {
    NSURL *fileURL = [[self applicationDocumentsDirectory] URLByAppendingPathComponent:self.currentCardPhoto.fileName];
    NSData *imageData = [NSData dataWithContentsOfURL:fileURL];
    NSDictionary *processingParams = @{@"language": @"English", @"exportFormat": @"xml", @"writeFieldComponents":@"true"};
    [[ASOCRClient sharedClient] startTaskWithImageData:imageData withParams:processingParams progressBlock:nil success:startSuccess failure:failure];
[[ASOCRClient sharedClient] activateInstallationWithDeviceId:[[[UIDevice currentDevice] identifierForVendor] UUIDString] success:activateSuccess failure:failure force:NO];

When I try to process a business card, I get these errors:

"Expected status code in (200-299), got 450" "<?xml version="1.0" encoding="utf-8"?><error><message language="english">Invalid parameter: writeFieldComponents</message></error>"

If I remove the "writeFieldComponents" parameter form the request, the process completes successfully.

asked 07 Feb '14, 01:35

cidesign's gravatar image


The parameter is called "xml:writeFieldComponents" (not just "writeFieldComponents").


answered 07 Feb '14, 19:01

Anastasia%20Galimova's gravatar image

Anastasia Ga... ♦♦

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 07 Feb '14, 01:35

Seen: 1,486 times

Last updated: 07 Feb '14, 19:01

© 2016 ABBYY. All rights Reserved. www.ABBYY.com | Privacy Policy | Legal