VintaSoft Twain .NET SDK Discussions

Questions, comments and suggestions concerning VintaSoft Twain .NET SDK.

Board index < VintaSoft Twain < VintaSoft Twain .NET SDK Discussions

We are migrating to new forums engine, no new registration or posting currently available. TIA for your patience.

"acquiredImages.get_Item is not a function"



"acquiredImages.get_Item is not a function"

Post by mywebforall »

Hi Alex,
sorry to bother you again .
I get this error while i'm tryng to create the object to send to an ftp server, here is my code:
switch (acquireModalState) {
                case 2:   // image is acquired
                    // get acquired image
                    var acquiredImage = acquireModalResult.get_AcquiredImage();
                    // add acquired image to the collection of acquired images
                    acquiredImages.add(acquiredImage);
                    
                    console.log(acquiredImages);
                    break;
                case 4:   // scan is failed
                    alert(acquireModalResult.get_ErrorMessage());
                    break;
                case 9:   // scan is finished
                let params = {};
                var imageIds = []
                    // for each acquired image
                    for (var i = 0; i < acquiredImages.get_Count(); i++){
                        // add image identifier to array of image identifiers
                        imageIds.push(acquiredImages.get_Item(i).get_Id());
                    }
                    // save images to an image file and return file data as a Base64 string
                    var imageFileAsBase64String = acquiredImages.getAsBase64String(nome_file+'.pdf', imageIds);
                    params.fileToUpload = imageFileAsBase64String;
Am i doing a mistake i don't catch?
Thank you in advance for your help.
Luigi


Re: "acquiredImages.get_Item is not a function" UPDATE

Post by mywebforall »

Find it!

There is a mistake in your Tutorial section : https://www.vintasoft.com/docs/vstwain ... rver.html .

The function is : *.getItem() , not *get_Item() .

Thank you anyway.
Best Regards,
Luigi


Re: "acquiredImages.get_Item is not a function"

Post by Alex »

Hi Luigi,

Thank you for information and sorry for the bug. We forgot to update article after API changes in VintaSoft TWAIN .NET SDK 14.0. Now article is updated.

Best regards, Alexander


Page 1 from 1: 1