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.

"Invalid Characters into the path"



"Invalid Characters into the path"

Post by mywebforall »

Hi Alex,

thank to you i managed to make the Web Scanning working, but when i call the acquiredImages.saveImages() method to save the file, i get an alert "Invalid Characters into the path". Honestly i don't understand to which characters is the alert referring.
Here is a part of the code with the method i call :
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);
                    // save acquired image to "result.pdf" file
                    console.log(acquiredImage);
                    acquiredImages.saveImages("C:\\Users\luigi\Desktop\PDF\result"+savedImageCount+".pdf", false, [ acquiredImage.get_Id() ]);
                    savedImageCount = savedImageCount + 1;
                    break;
                case 4:   // scan is failed
                    alert(acquireModalResult.get_ErrorMessage());
                    break;
                case 9:   // scan is finished
                    break;
            }
Best regards,
Luigi


Re: "Invalid Characters into the path"

Post by Alex »

Hi Luigi,

You have wrong file path in JavaScript code.

Here is path in your code: "C:\\Users\luigi\Desktop\PDF\result"+savedImageCount+".pdf"

Here is correct path: "C:\\Users\\luigi\\Desktop\\PDF\\result"+savedImageCount+".pdf"

Best regards, Alexander


Re: "Invalid Characters into the path"

Post by mywebforall »

Got it, thank you!
Best regards,
Luigi


Page 1 from 1: 1