Javascript capabilities

Questions, comments and suggestions concerning VintaSoft Twain ActiveX.

Moderator: Alex

Post Reply
geovan
Posts: 4
Joined: Wed Mar 11, 2009 7:43 pm

Javascript capabilities

Post by geovan »

Hi,

I'm having problems loading values for capType Array and Enumeration (supported resolutions, page sizes, etc.).

Can you please provide a javascript example?

Thanks,
Geovan.
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Javascript capabilities

Post by Alex »

Hello Geovan,

I don't know why VBArray object does not accept array from ActiveX. We will try to solve this problem in next version of ActiveX and maybe we will add new methods specially for JavaScript which will return array as string.

Best regards, Alexander
geovan
Posts: 4
Joined: Wed Mar 11, 2009 7:43 pm

Re: Javascript capabilities

Post by geovan »

Hello Alexander,

Please take into account that capItems, GetResolutions(), etc. does not work in JavaScript, JScript and VBScript.

Thanks for your reply,
Geovan.
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Javascript capabilities

Post by Alex »

Hello Geovan,

Please try to use version 5.0 of VintaSoftTwain ActiveX.

Best regards, Alexander
geovan
Posts: 4
Joined: Wed Mar 11, 2009 7:43 pm

Re: Javascript capabilities

Post by geovan »

Hello Alexander,

I'v tryied using version 5.0 but I got the same issues from JavaScript and VBScript.

Thanks,
Geovan.
Alex
Site Admin
Posts: 2305
Joined: Thu Jul 10, 2008 2:21 pm

Re: Javascript capabilities

Post by Alex »

Hello Geovan,

You should use the ConvertArrayToString method. Here is an example:

Code: Select all

alert("Supported resolutions: " + VSTwain1.ConvertArrayToString(VSTwain1.GetResolutions()));
Best regards, Alexander
geovan
Posts: 4
Joined: Wed Mar 11, 2009 7:43 pm

Re: Javascript capabilities

Post by geovan »

Hello Alexander,

A minor modification, parameter Digits After Point is required:

Code: Select all

alert("Supported resolutions: " + VSTwain1.ConvertArrayToString(VSTwain1.GetResolutions(), 0));
It is working fine now!

Thank you very much,
Geovan.
Post Reply