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.



asked 12 Aug '16, 18:40

Numair%20Ali%20Arif's gravatar image

Numair Ali Arif

edited 12 Aug '16, 18:47

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.


answered 15 Aug '16, 15:03

Oksana%20Serdyuk's gravatar image

Oksana Serdyuk ♦♦

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.



(17 Aug '16, 17:16) Numair Ali Arif

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.

(18 Aug '16, 17:04) Oksana Serdyuk ♦♦

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.

(18 Aug '16, 17:25) Numair Ali Arif

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

(18 Aug '16, 17:59) Oksana Serdyuk ♦♦

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

(18 Aug '16, 18:00) Numair Ali Arif

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.

(18 Aug '16, 18:16) Numair Ali Arif

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

I'm sorry for possible inconvenience.

(19 Aug '16, 13:14) Oksana Serdyuk ♦♦
showing 5 of 7 show 2 more comments
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: 12 Aug '16, 18:40

Seen: 425 times

Last updated: 19 Aug '16, 13:14

Related questions

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