How to Use ABBY Cloud SDk with simple JavaScript?

  • 468 Views
  • Last Post 19 August 2016
Numair Ali Arif posted this 12 August 2016

Hi,

I am trying to use Cloud SDK with pure Javascript and I am facing some issues. Could you please provide some description how the existing code you provided under code samples for Javascript can be used with pure JS Or if you could provide some node.js code using the two JS files (i.e test.js and ocrsdk.js)?

The Error I am getting is "This code must be run on server side under NodeJS" from test.js file.

I am done with the following steps:

  1. The sample requires xml2js module. Install it by 'npm install xml2js' command.
  2. Before you start, you need to provide correct Application Id and Password in test.js file.

Note: If the code sample you provided requires the skills of Node.js then can you provide us the code of pure javascript that doesn't use any JS frameworks.

Thanks,

Numair

Order By: Standard | Newest | Votes
Oksana Serdyuk posted this 15 August 2016

To let us investigate the issue, please specify the following information:

  1. Your Application ID.
  2. When did you download the JavaScript code sample?

The fact is that there was a change in NodeJS a while ago and the documentation was not updated at the proper time (this is a defect report in NodeJS). Thus, our sample has an issue in the code some short period of time. The corresponding change was published on July 1.

Numair Ali Arif posted this 17 August 2016

Thanks for replying to me.

The application ID is "CLTS MOBO". I just downloaded the code last week.

I want to add one thing. The code that I have is, when I run it from CMD with the command "node test.js" it runs fine. It takes the picture from the specified path and does the conversion. But we want to this thing with simple(standard) Javascript.

I would appreciate it if you could please help me in this matter.

Thanks,

Numair

Oksana Serdyuk posted this 18 August 2016

I'm sorry, but at the moment only this code sample for JavaScript is available. I will send our analysts your suggestion to add new code samples.

Numair Ali Arif posted this 18 August 2016

Could you please please set a call with any of the JS developer regarding this? I am sure there might be a solution of reusing this piece of code with simple JS.

Also, I think this code plays the role of enabling the client to consume ABBY Cloud OCR (kind a web service) so I don't think that piece of code is only meant to run through CMD with node command.

Oksana Serdyuk posted this 18 August 2016

Kindly describe how you are going to use it? Do you want to run it in a browser?

Numair Ali Arif posted this 18 August 2016

Or if you could please provide some guide regarding how this code works other than running it with CMD.

Numair Ali Arif posted this 18 August 2016

We are looking to use it our cross platform application.

Yes, if you could provide us piece of code working through browser that would be great.

Oksana Serdyuk posted this 19 August 2016

Unfortunately, ABBYY Cloud OCR SDK does not support the cross-domain requests.

I'm sorry for possible inconvenience.

Close